@@ -40,7 +40,7 @@ def _fit_calibrated_classifer(estimator, X, y, train, test, supports_sw,
40
40
Returns
41
41
-------
42
42
calibrated_classifier : estimator object
43
- The calibrated estimator
43
+ The calibrated estimator.
44
44
"""
45
45
if sample_weight is not None and supports_sw :
46
46
estimator .fit (X [train ], y [train ],
@@ -91,7 +91,7 @@ class CalibratedClassifierCV(ClassifierMixin,
91
91
use isotonic calibration with too few calibration samples
92
92
``(<<1000)`` since it tends to overfit.
93
93
94
- cv : integer , cross-validation generator, iterable or "prefit", \
94
+ cv : int , cross-validation generator, iterable or "prefit", \
95
95
default=None
96
96
Determines the cross-validation splitting strategy.
97
97
Possible inputs for cv are:
@@ -127,7 +127,7 @@ class CalibratedClassifierCV(ClassifierMixin,
127
127
128
128
.. versionadded:: 0.24
129
129
130
- pre_dispatch : int, or str, default=n_jobs
130
+ pre_dispatch : int or str, default='2* n_jobs'
131
131
Controls the number of jobs that get dispatched during parallel
132
132
execution. Reducing this number can be useful to avoid an
133
133
explosion of memory consumption when more jobs get dispatched
@@ -146,14 +146,14 @@ class CalibratedClassifierCV(ClassifierMixin,
146
146
147
147
.. versionadded:: 0.24
148
148
149
- verbose : integer
149
+ verbose : int, default=0
150
150
Controls the verbosity: the higher, the more messages.
151
151
152
152
.. versionadded:: 0.24
153
153
154
154
Attributes
155
155
----------
156
- classes_ : array, shape (n_classes)
156
+ classes_ : ndarray of shape (n_classes, )
157
157
The class labels.
158
158
159
159
calibrated_classifiers_ : list (len() equal to cv or 1 if cv == "prefit")
@@ -231,10 +231,10 @@ def fit(self, X, y, sample_weight=None):
231
231
232
232
Parameters
233
233
----------
234
- X : array-like, shape (n_samples, n_features)
234
+ X : array-like of shape (n_samples, n_features)
235
235
Training data.
236
236
237
- y : array-like, shape (n_samples,)
237
+ y : array-like of shape (n_samples,)
238
238
Target values.
239
239
240
240
sample_weight : array-like of shape (n_samples,), default=None
@@ -328,12 +328,12 @@ def predict_proba(self, X):
328
328
329
329
Parameters
330
330
----------
331
- X : array-like, shape (n_samples, n_features)
331
+ X : array-like of shape (n_samples, n_features)
332
332
The samples.
333
333
334
334
Returns
335
335
-------
336
- C : array, shape (n_samples, n_classes)
336
+ C : ndarray of shape (n_samples, n_classes)
337
337
The predicted probas.
338
338
"""
339
339
check_is_fitted (self )
@@ -357,12 +357,12 @@ class that has the highest probability, and can thus be different
357
357
358
358
Parameters
359
359
----------
360
- X : array-like, shape (n_samples, n_features)
360
+ X : array-like of shape (n_samples, n_features)
361
361
The samples.
362
362
363
363
Returns
364
364
-------
365
- C : array, shape (n_samples,)
365
+ C : ndarray of shape (n_samples,)
366
366
The predicted class.
367
367
"""
368
368
check_is_fitted (self )
@@ -392,12 +392,12 @@ class _CalibratedClassifier:
392
392
to offer more accurate predict_proba outputs. No default value since
393
393
it has to be an already fitted estimator.
394
394
395
- method : 'sigmoid' | 'isotonic'
395
+ method : { 'sigmoid', 'isotonic'}, default='sigmoid '
396
396
The method to use for calibration. Can be 'sigmoid' which
397
397
corresponds to Platt's method or 'isotonic' which is a
398
398
non-parametric approach based on isotonic regression.
399
399
400
- classes : array-like, shape (n_classes,), optional
400
+ classes : array-like of shape (n_classes,), default=None
401
401
Contains unique classes used to fit the base estimator.
402
402
if None, then classes is extracted from the given target values
403
403
in fit().
@@ -450,10 +450,10 @@ def fit(self, X, y, sample_weight=None):
450
450
451
451
6D40
Parameters
452
452
----------
453
- X : array-like, shape (n_samples, n_features)
453
+ X : array-like of shape (n_samples, n_features)
454
454
Training data.
455
455
456
- y : array-like, shape (n_samples,)
456
+ y : array-like of shape (n_samples,)
457
457
Target values.
458
458
459
459
sample_weight : array-like of shape (n_samples,), default=None
@@ -498,12 +498,12 @@ def predict_proba(self, X):
498
498
499
499
Parameters
500
500
----------
501
- X : array-like, shape (n_samples, n_features)
501
+ X : array-like of shape (n_samples, n_features)
502
502
The samples.
503
503
504
504
Returns
505
505
-------
506
- C : array, shape (n_samples, n_classes)
506
+ C : ndarray of shape (n_samples, n_classes)
507
507
The predicted probas. Can be exact zeros.
508
508
"""
509
509
n_classes = len (self .classes_ )
@@ -537,10 +537,10 @@ def _sigmoid_calibration(df, y, sample_weight=None):
537
537
538
538
Parameters
539
539
----------
540
- df : ndarray, shape (n_samples,)
540
+ df : ndarray of shape (n_samples,)
541
541
The decision function or predict proba for the samples.
542
542
543
- y : ndarray, shape (n_samples,)
543
+ y : ndarray of shape (n_samples,)
544
544
The targets.
545
545
546
546
sample_weight : array-like of shape (n_samples,), default=None
@@ -611,10 +611,10 @@ def fit(self, X, y, sample_weight=None):
611
611
612
612
Parameters
613
613
----------
614
- X : array-like, shape (n_samples,)
614
+ X : array-like of shape (n_samples,)
615
615
Training data.
616
616
617
- y : array-like, shape (n_samples,)
617
+ y : array-like of shape (n_samples,)
618
618
Training target.
619
619
620
620
sample_weight : array-like of shape (n_samples,), default=None
@@ -637,12 +637,12 @@ def predict(self, T):
637
637
638
638
Parameters
639
639
----------
640
- T : array-like, shape (n_samples,)
640
+ T : array-like of shape (n_samples,)
641
641
Data to predict from.
642
642
643
643
Returns
644
644
-------
645
- T_ : array, shape (n_samples,)
645
+ T_ : ndarray of shape (n_samples,)
646
646
The predicted data.
647
647
"""
648
648
T = column_or_1d (T )
0 commit comments