sdpython / papierstat

@@ -73,7 +73,7 @@
Loading
73 73
    test[label] = test[label].str.strip(' .')
74 74
    cols = train.select_dtypes(object).columns
75 75
    for c in cols:
76 -
        train[c] = train[c].str.strip()
76 +
        train[c] = train[c].str.strip()  # pylint: disable=E1136,E1137
77 77
    for c in cols:
78 78
        test[c] = test[c].str.strip()
79 79
    return train, test

@@ -115,12 +115,13 @@
Loading
115 115
    # API scikit-learn
116 116
    ###################
117 117
118 -
    def fit(self, X, y=None, **kwargs):
118 +
    def fit(self, X, y=None, sample_weight=None, **kwargs):
119 119
        """
120 120
        Apprends un modèle pour chaque modalité d'une catégorie.
121 121
122 122
        @param      X               features
123 123
        @param      y               cibles
124 +
        @param      sample_weight   poids de chaque observation
124 125
        @return                     self, lui-même
125 126
126 127
        La fonction n'est pas parallélisée mais elle le pourrait.
@@ -131,7 +132,6 @@
Loading
131 132
                raise ValueError(  # pragma: no cover
132 133
                    "One of the row has a missing category.")
133 134
134 -
        sample_weight = kwargs.get('sample_weight', None)
135 135
        res = {}
136 136
        for c in sorted(cats):
137 137
            _, xcat, ycat, scat = self._filter_cat(c, X, y, sample_weight)
Files Coverage
src/papierstat 93.89%
Project Totals (21 files) 93.89%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading