@@ -12,25 +12,25 @@ class Perceptron(BaseSGDClassifier):
12
12
Parameters
13
13
----------
14
14
15
- penalty : None, 'l2' or 'l1' or 'elasticnet'
16
- The penalty (aka regularization term) to be used. Defaults to None.
15
+ penalty : { 'l2', 'l1', 'elasticnet'}, default=None
16
+ The penalty (aka regularization term) to be used.
17
17
18
- alpha : float
18
+ alpha : float, default=0.0001
19
19
Constant that multiplies the regularization term if regularization is
20
- used. Defaults to 0.0001
20
+ used.
21
21
22
- fit_intercept : bool
22
+ fit_intercept : bool, default=True
23
23
Whether the intercept should be estimated or not. If False, the
24
- data is assumed to be already centered. Defaults to True.
24
+ data is assumed to be already centered.
25
25
26
- max_iter : int, optional ( default=1000)
26
+ max_iter : int, default=1000
27
27
The maximum number of passes over the training data (aka epochs).
28
28
It only impacts the behavior in the ``fit`` method, and not the
29
29
:meth:`partial_fit` method.
30
30
31
31
.. versionadded:: 0.19
32
32
33
- tol : float or None, optional ( default=1e-3)
33
+ tol : float, default=1e-3
34
34
The stopping criterion. If it is not None, the iterations will stop
35
35
when (loss > previous_loss - tol).
36
36
@@ -39,20 +39,20 @@ class Perceptron(BaseSGDClassifier):
39
39
shuffle : bool, default=True
40
40
Whether or not the training data should be shuffled after each epoch.
41
41
42
- verbose : integer , default=0
42
+ verbose : int , default=0
43
43
The verbosity level
44
44
45
- eta0 : double
46
- Constant by which the updates are multiplied. Defaults to 1.
45
+ eta0 : double, default=1
46
+ Constant by which the updates are multiplied.
47
47
48
- n_jobs : int or None, optional ( default=None)
48
+ n_jobs : int, default=None
49
49
The number of CPUs to use to do the OVA (One Versus All, for
50
50
multi-class problems) computation.
51
51
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
52
52
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
53
53
for more details.
54
54
55
- random_state : int, RandomState instance or None, optional, default None
55
+ random_state : int, RandomState instance, default= None
56
56
The seed of the pseudo random number generator to use when shuffling
57
57
the data. If int, random_state is the seed used by the random number
58
58
generator; If RandomState instance, random_state is the random number
@@ -80,7 +80,7 @@ class Perceptron(BaseSGDClassifier):
80
80
81
81
.. versionadded:: 0.20
82
82
83
<
8000
/td>
- class_weight : dict, {class_label: weight} or "balanced" or None, optional
83
+ class_weight : dict, {class_label: weight} or "balanced", default=None
84
84
Preset for the class_weight fit parameter.
85
85
86
86
Weights associated with classes. If not given, all classes
@@ -97,18 +97,18 @@ class Perceptron(BaseSGDClassifier):
97
97
98
98
Attributes
99
99
----------
100
- coef_ : array, shape = [1, n_features] if n_classes == 2 else [n_classes, \
101
- n_features]
100
+ coef_ : ndarray of shape = [1, n_features] if n_classes == 2 else \
101
+ [n_classes, n_features]
102
102
Weights assigned to the features.
103
103
104
- intercept_ : array, shape = [1] if n_classes == 2 else [n_classes]
104
+ intercept_ : ndarray of shape = [1] if n_classes == 2 else [n_classes]
105
105
Constants in decision function.
106
106
107
107
n_iter_ : int
108
108
The actual number of iterations to reach the stopping criterion.
109
109
For multiclass fits, it is the maximum over every binary fit.
110
110
111
- classes_ : array of shape (n_classes,)
111
+ classes_ : ndarray of shape (n_classes,)
112
112
The unique classes labels.
113
113
114
114
t_ : int
0 commit comments