Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit 8de52a4

Browse files
committed
Docstring for fit
1 parent a27a6ac commit 8de52a4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

lightning/impl/sag.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,17 @@ def __init__(self, eta='auto', alpha=1.0, beta=0.0, loss="smooth_hinge",
145145
self.is_saga = False
146146

147147
def fit(self, X, y, sample_weight=None):
148+
"""
149+
Parameters
150+
----------
151+
X : numpy array, sparse matrix or RowDataset of size (n_samples, n_features)
152+
y : numpy array of size (n_samples,)
153+
sample_weight : numpy array of size (n_samples,), optional
154+
155+
Returns
156+
-------
157+
self
158+
"""
148159
if not self.is_saga and self.penalty is not None:
149160
raise ValueError('Penalties in SAGClassifier. Please use '
150161
'SAGAClassifier instead.'
@@ -261,6 +272,17 @@ def __init__(self, eta='auto', alpha=1.0, beta=0.0, loss="smooth_hinge",
261272
self.is_saga = False
262273

263274
def fit(self, X, y, sample_weight=None):
275+
"""
276+
Parameters
277+
----------
278+
X : numpy array, sparse matrix or RowDataset of size (n_samples, n_features)
279+
y : numpy array of size (n_samples,)
280+
sample_weight : numpy array of size (n_samples,), optional
281+
282+
Returns
283+
-------
284+
self
285+
"""
264286
if not self.is_saga and self.penalty is not None:
265287
raise ValueError('Penalties are not supported in SAGRegressor. '
266288
'Please use SAGARegressor instead.')

0 commit comments

Comments
 (0)