Class: SGDRegressor

SGDRegressor(params)

new SGDRegressor(params)

Learns linear regressor model using Stochastic Gradient Descent to fit the model to the data.
Parameters:
Name Type Description
params Object Parameters of the estimator.
Properties
Name Type Attributes Description
alpha Number <optional>
Multiplier of the regularization term in the objective of SGD.
l1_ratio Number <optional>
Fraction of L1 regularization in sum of L1 and L2 regularizations.
max_iter Number <optional>
Maximum number of iterations for which to train the model.
eta0 Number <optional>
Learning rate for the algorithm.
penalty String <optional>
Type of penalty to use. Supported - 'elasticnet': both L1 and L2 penalty are used; Ratio between the two losses is specified using `l1_ratio` parameter.
loss String <optional>
Loss to use during training. Supported losses are: - 'squared_loss': squared error, l(y, f) = 1/n \sum_{i = 1..n}(y_i - f_i)^2 This loss is often used for regression problems. - 'hinge': Hinge loss, l(y, f) = 1/n \sum_{i = 1..n} max(0, 1 - y_i * f_i) This loss assumes that y_i \in {-1, 1}. Most of the time this loss is used for classification problems.
Source:

Methods

to_tabulator(features)

Converts a linear model to format that can be visualized using http://tabulator.info/.
Parameters:
Name Type Default Description
features Array null Array of dictionaries, which contain information on names of the features and type of the features. Every element in the array should contain the following information: name - name of the features type - type of the feature, boolean or number
Source: