Permalink
Browse files

Slight documentation tweak

  • Loading branch information...
1 parent 8f1dedb commit 060a0f07329bd9edd72c10c923eec11164f86a4e @batterseapower committed Aug 16, 2008
Showing with 6 additions and 1 deletion.
  1. +6 −1 Algorithms/MachineLearning/LinearRegression.hs
@@ -31,15 +31,20 @@ instance Model LinearModel where
--
-- However, the model will be the optimal model for the data given the basis in least-squares terms. It
-- is also very quick to find, since there is a closed form solution.
+--
+-- Equation 3.15 in Bishop.
regressLinearModel :: (Vectorable input) => [input -> Target] -> DataSet input -> LinearModel input
regressLinearModel = regressLinearModelCore pinv
-- | Regress a basic linear model with a sum-of-squares regularization term. This penalizes models with weight
-- vectors of large magnitudes and hence ameliorates the over-fitting problem of 'regressLinearModel'.
--- The strength of the regularization is controlled by the lambda parameter.
+-- The strength of the regularization is controlled by the lambda parameter. If lambda is 0 then this function
+-- is equivalent to the unregularized regression.
--
-- The resulting model will be optimal in terms of least-squares penalized by lambda times the sum-of-squares of
-- the weight vector. Like 'regressLinearModel', a closed form solution is used to find the model quickly.
+--
+-- Equation 3.28 in Bishop.
regressRegularizedLinearModel :: (Vectorable input) => RegularizationCoefficient -> [input -> Target] -> DataSet input -> LinearModel input
regressRegularizedLinearModel lambda = regressLinearModelCore regularizedPinv
where

0 comments on commit 060a0f0

Please sign in to comment.