diff --git a/doc/developers/index.rst b/doc/developers/index.rst index 047f9cea827aa730ce3d0ac93c111abb0554e3a8..f53bc7baa966902b474b8db1f431d6d99a386328 100644 --- a/doc/developers/index.rst +++ b/doc/developers/index.rst @@ -240,7 +240,7 @@ this is left to the ``fit()`` method:: The arguments that go in the `__init__` should all be keyword arguments -with a defaut value. In other words, a user should be able to instanciate +with a default value. In other words, a user should be able to instanciate an estimator without passing to it any arguments. The arguments in given at instanciation of an estimator should all diff --git a/doc/modules/glm.rst b/doc/modules/glm.rst index a9476dda9a6958ff2da0003df919d5d5c0891e85..56c58e94f704181d4b968748ca2a0f78b010a1d6 100644 --- a/doc/modules/glm.rst +++ b/doc/modules/glm.rst @@ -110,13 +110,13 @@ regularizer. The objective function to minimize is: .. math:: 0.5 * ||y - X w||_2 ^ 2 + \alpha * ||w||_1 -The lasso estimate solves thus solves the minization of the +The lasso estimate thus solves the minization of the least-squares penalty with :math:`\alpha * ||w||_1` added, where :math:`\alpha` is a constant and :math:`||w||_1` is the L1-norm of the parameter vector. -This formulation is useful in some context due to its tendency to +This formulation is useful in some contexts due to its tendency to prefer solutions with fewer parameter values, effectively reducing the number of variables upon which the given solution is dependent. For this reason, the Lasso and its variants are fundamental to the field diff --git a/scikits/learn/datasets/samples_generator.py b/scikits/learn/datasets/samples_generator.py index cea4b91728312b4efb447200b47f89207d6f982f..8eae1ed7f4dc30067477ebf1606a853910adefc8 100644 --- a/scikits/learn/datasets/samples_generator.py +++ b/scikits/learn/datasets/samples_generator.py @@ -1,15 +1,14 @@ -import numpy as np -import numpy.random as nr - - """ -Samples generator - +Generate samples of synthetic data sets. """ # Author: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel # License: BSD 3 clause +import numpy as np +import numpy.random as nr + + def samples_classif(): pass @@ -122,9 +121,9 @@ def sparse_uncorrelated(nb_samples=100, nb_features=10): Parameters ---------- nb_samples : int - number of samples (defaut is 100). + number of samples (default is 100). nb_features : int - number of features (defaut is 5). + number of features (default is 5). Returns ------- @@ -148,9 +147,9 @@ def friedman(nb_samples=100, nb_features=10,noise_std=1): Parameters ---------- nb_samples : int - number of samples (defaut is 100). + number of samples (default is 100). nb_features : int - number of features (defaut is 10). + number of features (default is 10). noise_std : float std of the noise, which is added as noise_std*NR.normal(0,1) Returns diff --git a/scikits/learn/glm/bayes.py b/scikits/learn/glm/bayes.py index 9768d67c9d5236dc2f2943df4c6072ce27c5fc6c..bf4246316f1ad6a3434758e853bdfe4fbd44af68 100644 --- a/scikits/learn/glm/bayes.py +++ b/scikits/learn/glm/bayes.py @@ -29,25 +29,25 @@ class BayesianRidge(LinearModel): Y : numpy array of shape (length) Target values for training vectors - n_iter : int (defaut is 300) + n_iter : int (default is 300) Maximum number of interations. - eps : float (defaut is 1.e-3) + eps : float (default is 1.e-3) Stop the algorithm if w has converged. - alpha_1 : float (defaut is 1.e-6) + alpha_1 : float (default is 1.e-6) Hyper-parameter : shape parameter for the Gamma distribution prior over the alpha parameter. - alpha_2 : float (defaut is 1.e-6) + alpha_2 : float (default is 1.e-6) Hyper-parameter : inverse scale parameter (rate parameter) for the Gamma distribution prior over the alpha parameter. - lambda_1 : float (defaut is 1.e-6) + lambda_1 : float (default is 1.e-6) Hyper-parameter : shape parameter for the Gamma distribution prior over the lambda parameter. - lambda_2 : float (defaut is 1.e-6) + lambda_2 : float (default is 1.e-6) Hyper-parameter : inverse scale parameter (rate parameter) for the Gamma distribution prior over the lambda parameter. @@ -95,25 +95,25 @@ class BayesianRidge(LinearModel): """ Parameters ---------- - n_iter : int (defaut is 300) + n_iter : int (default is 300) Maximum number of interations. - eps : float (defaut is 1.e-3) + eps : float (default is 1.e-3) Stop the algorithm if w has converged. - alpha_1 : float (defaut is 1.e-6) + alpha_1 : float (default is 1.e-6) Hyper-parameter : shape parameter for the Gamma distribution prior over the alpha parameter. - alpha_2 : float (defaut is 1.e-6) + alpha_2 : float (default is 1.e-6) Hyper-parameter : inverse scale parameter (rate parameter) for the Gamma distribution prior over the alpha parameter. - lambda_1 : float (defaut is 1.e-6) + lambda_1 : float (default is 1.e-6) Hyper-parameter : shape parameter for the Gamma distribution prior over the lambda parameter. - lambda_2 : float (defaut is 1.e-6) + lambda_2 : float (default is 1.e-6) Hyper-parameter : inverse scale parameter (rate parameter) for the Gamma distribution prior over the lambda parameter. @@ -264,25 +264,25 @@ class ARDRegression(LinearModel): Y : numpy array of shape (length) Target values for training vectors - n_iter : int (defaut is 300) + n_iter : int (default is 300) Maximum number of interations. - eps : float (defaut is 1.e-3) + eps : float (default is 1.e-3) Stop the algorithm if w has converged. - alpha_1 : float (defaut is 1.e-6) + alpha_1 : float (default is 1.e-6) Hyper-parameter : shape parameter for the Gamma distribution prior over the alpha parameter. - alpha_2 : float (defaut is 1.e-6) + alpha_2 : float (default is 1.e-6) Hyper-parameter : inverse scale parameter (rate parameter) for the Gamma distribution prior over the alpha parameter. - lambda_1 : float (defaut is 1.e-6) + lambda_1 : float (default is 1.e-6) Hyper-parameter : shape parameter for the Gamma distribution prior over the lambda parameter. - lambda_2 : float (defaut is 1.e-6) + lambda_2 : float (default is 1.e-6) Hyper-parameter : inverse scale parameter (rate parameter) for the Gamma distribution prior over the lambda parameter. @@ -335,25 +335,25 @@ class ARDRegression(LinearModel): """ Parameters ---------- - n_iter : int (defaut is 300) + n_iter : int (default is 300) Maximum number of interations. - eps : float (defaut is 1.e-3) + eps : float (default is 1.e-3) Stop the algorithm if w has converged. - alpha_1 : float (defaut is 1.e-6) + alpha_1 : float (default is 1.e-6) Hyper-parameter : shape parameter for the Gamma distribution prior over the alpha parameter. - alpha_2 : float (defaut is 1.e-6) + alpha_2 : float (default is 1.e-6) Hyper-parameter : inverse scale parameter (rate parameter) for the Gamma distribution prior over the alpha parameter. - lambda_1 : float (defaut is 1.e-6) + lambda_1 : float (default is 1.e-6) Hyper-parameter : shape parameter for the Gamma distribution prior over the lambda parameter. - lambda_2 : float (defaut is 1.e-6) + lambda_2 : float (default is 1.e-6) Hyper-parameter : inverse scale parameter (rate parameter) for the Gamma distribution prior over the lambda parameter.