Mercurial > pylearn
comparison linear_regression.py @ 132:f6505ec32dc3
Updated documentation slightly
author | Joseph Turian <turian@gmail.com> |
---|---|
date | Thu, 08 May 2008 00:54:14 -0400 |
parents | d0a1bd0378c6 |
children | c9a89be5cb0a |
comparison
equal
deleted
inserted
replaced
131:57e6492644ec | 132:f6505ec32dc3 |
---|---|
1 """ | |
2 Implementation of linear regression, with or without L2 regularization. | |
3 This is one of the simplest example of L{learner}, and illustrates | |
4 the use of theano. | |
5 """ | |
1 | 6 |
2 from learner import * | 7 from learner import * |
3 from theano import tensor as t | 8 from theano import tensor as t |
4 from theano.scalar import as_scalar | 9 from theano.scalar import as_scalar |
5 | 10 |
6 # this is one of the simplest example of learner, and illustrates | |
7 # the use of theano | |
8 class LinearRegression(MinibatchUpdatesTLearner): | 11 class LinearRegression(MinibatchUpdatesTLearner): |
9 """ | 12 """ |
10 Implement linear regression, with or without L2 regularization | 13 Implement linear regression, with or without L2 regularization |
11 (the former is called Ridge Regression and the latter Ordinary Least Squares). | 14 (the former is called Ridge Regression and the latter Ordinary Least Squares). |
12 | 15 |