{"flow":{"id":"17458","uploader":"10776","name":"sklearn.linear_model._stochastic_gradient.SGDClassifier","custom_name":"sklearn.SGDClassifier","class_name":"sklearn.linear_model._stochastic_gradient.SGDClassifier","version":"1","external_version":"openml==0.10.2,sklearn==0.22","description":"Linear classifiers (SVM, logistic regression, a.o.) with SGD training.\n\nThis estimator implements regularized linear models with stochastic\ngradient descent (SGD) learning: the gradient of the loss is estimated\neach sample at a time and the model is updated along the way with a\ndecreasing strength schedule (aka learning rate). SGD allows minibatch\n(online\/out-of-core) learning, see the partial_fit method.\nFor best results using the default learning rate schedule, the data should\nhave zero mean and unit variance.\n\nThis implementation works with data represented as dense or sparse arrays\nof floating point values for the features. The model it fits can be\ncontrolled with the loss parameter; by default, it fits a linear support\nvector machine (SVM).\n\nThe regularizer is a penalty added to the loss function that shrinks model\nparameters towards the zero vector using either the squared euclidean norm\nL2 or the absolute norm L1 or a combination of both (Elastic Net). If the\nparameter update crosses the 0.0 value b...","upload_date":"2019-12-13T20:14:52","language":"English","dependencies":"sklearn==0.22\nnumpy>=1.6.1\nscipy>=0.9","parameter":[{"name":"alpha","data_type":"float","default_value":"0.0001","description":"Constant that multiplies the regularization term. Defaults to 0.0001\n Also used to compute learning_rate when set to 'optimal'"},{"name":"average","data_type":"bool or int","default_value":"false","description":"When set to True, computes the averaged SGD weights and stores the\n result in the ``coef_`` attribute. If set to an int greater than 1,\n averaging will begin once the total number of samples seen reaches\n average. So ``average=10`` will begin averaging after seeing 10\n samples."},{"name":"class_weight","data_type":"dict","default_value":"null","description":"Preset for the class_weight fit parameter\n\n Weights associated with classes. If not given, all classes\n are supposed to have weight one\n\n The \"balanced\" mode uses the values of y to automatically adjust\n weights inversely proportional to class frequencies in the input data\n as ``n_samples \/ (n_classes * np.bincount(y))``"},{"name":"early_stopping","data_type":"bool","default_value":"false","description":"Whether to use early stopping to terminate training when validation\n score is not improving. If set to True, it will automatically set aside\n a stratified fraction of training data as validation and terminate\n training when validation score is not improving by at least tol for\n n_iter_no_change consecutive epochs\n\n .. versionadded:: 0.20"},{"name":"epsilon","data_type":"float","default_value":"0.1","description":"Epsilon in the epsilon-insensitive loss functions; only if `loss` is\n 'huber', 'epsilon_insensitive', or 'squared_epsilon_insensitive'\n For 'huber', determines the threshold at which it becomes less\n important to get the prediction exactly right\n For epsilon-insensitive, any differences between the current prediction\n and the correct label are ignored if they are less than this threshold"},{"name":"eta0","data_type":"double","default_value":"0.0","description":"The initial learning rate for the 'constant', 'invscaling' or\n 'adaptive' schedules. The default value is 0.0 as eta0 is not used by\n the default schedule 'optimal'"},{"name":"fit_intercept","data_type":"bool","default_value":"true","description":"Whether the intercept should be estimated or not. If False, the\n data is assumed to be already centered. Defaults to True"},{"name":"l1_ratio","data_type":"float","default_value":"0.15","description":"The Elastic Net mixing parameter, with 0 <= l1_ratio <= 1\n l1_ratio=0 corresponds to L2 penalty, l1_ratio=1 to L1\n Defaults to 0.15"},{"name":"learning_rate","data_type":"str","default_value":"\"optimal\"","description":"The learning rate schedule:\n\n 'constant':\n eta = eta0\n 'optimal': [default]\n eta = 1.0 \/ (alpha * (t + t0))\n where t0 is chosen by a heuristic proposed by Leon Bottou\n 'invscaling':\n eta = eta0 \/ pow(t, power_t)\n 'adaptive':\n eta = eta0, as long as the training keeps decreasing\n Each time n_iter_no_change consecutive epochs fail to decrease the\n training loss by tol or fail to increase validation score by tol if\n early_stopping is True, the current learning rate is divided by 5"},{"name":"loss","data_type":"str","default_value":"\"hinge\"","description":"The loss function to be used. Defaults to 'hinge', which gives a\n linear SVM\n\n The possible options are 'hinge', 'log', 'modified_huber',\n 'squared_hinge', 'perceptron', or a regression loss: 'squared_loss',\n 'huber', 'epsilon_insensitive', or 'squared_epsilon_insensitive'\n\n The 'log' loss gives logistic regression, a probabilistic classifier\n 'modified_huber' is another smooth loss that brings tolerance to\n outliers as well as probability estimates\n 'squared_hinge' is like hinge but is quadratically penalized\n 'perceptron' is the linear loss used by the perceptron algorithm\n The other losses are designed for regression but can be useful in\n classification as well; see SGDRegressor for a description"},{"name":"max_iter","data_type":"int","default_value":"1000","description":"The maximum number of passes over the training data (aka epochs)\n It only impacts the behavior in the ``fit`` method, and not the\n :meth:`partial_fit` method\n\n .. versionadded:: 0.19"},{"name":"n_iter_no_change","data_type":"int","default_value":"5","description":"Number of iterations with no improvement to wait before early stopping\n\n .. versionadded:: 0.20"},{"name":"n_jobs","data_type":"int or None","default_value":"null","description":"The number of CPUs to use to do the OVA (One Versus All, for\n multi-class problems) computation\n ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context\n ``-1`` means using all processors. See :term:`Glossary `\n for more details"},{"name":"penalty","data_type":"str","default_value":"\"l2\"","description":"The penalty (aka regularization term) to be used. Defaults to 'l2'\n which is the standard regularizer for linear SVM models. 'l1' and\n 'elasticnet' might bring sparsity to the model (feature selection)\n not achievable with 'l2'"},{"name":"power_t","data_type":"double","default_value":"0.5","description":"The exponent for inverse scaling learning rate [default 0.5]"},{"name":"random_state","data_type":"int","default_value":"null","description":"The seed of the pseudo random number generator to use when shuffling\n the data. If int, random_state is the seed used by the random number\n generator; If RandomState instance, random_state is the random number\n generator; If None, the random number generator is the RandomState\n instance used by `np.random`"},{"name":"shuffle","data_type":"bool","default_value":"true","description":"Whether or not the training data should be shuffled after each epoch\n Defaults to True"},{"name":"tol","data_type":"float or None","default_value":"0.001","description":"The stopping criterion. If it is not None, the iterations will stop\n when (loss > best_loss - tol) for ``n_iter_no_change`` consecutive\n epochs\n\n .. versionadded:: 0.19"},{"name":"validation_fraction","data_type":"float","default_value":"0.1","description":"The proportion of training data to set aside as validation set for\n early stopping. Must be between 0 and 1\n Only used if early_stopping is True\n\n .. versionadded:: 0.20"},{"name":"verbose","data_type":"int","default_value":"0","description":"The verbosity level"},{"name":"warm_start","data_type":"bool","default_value":"false","description":"When set to True, reuse the solution of the previous call to fit as\n initialization, otherwise, just erase the previous solution\n See :term:`the Glossary `\n\n Repeatedly calling fit or partial_fit when warm_start is True can\n result in a different solution than when calling fit a single time\n because of the way the data is shuffled\n If a dynamic learning rate is used, the learning rate is adapted\n depending on the number of samples already seen. Calling ``fit`` resets\n this counter, while ``partial_fit`` will result in increasing the\n existing counter"}],"tag":["openml-python","python","scikit-learn","sklearn","sklearn_0.22"]}}