# HG changeset patch # User Frederic Bastien # Date 1315838913 14400 # Node ID bf5c0f79716116ef065ff35c66de8a4a726b6029 # Parent 1ee532a6f33b0664aea70dcc56b4652e722f9adb Fix test. diff -r 1ee532a6f33b -r bf5c0f797161 pylearn/algorithms/kernel_regression.py --- a/pylearn/algorithms/kernel_regression.py Mon Sep 12 10:24:24 2011 -0400 +++ b/pylearn/algorithms/kernel_regression.py Mon Sep 12 10:48:33 2011 -0400 @@ -2,7 +2,7 @@ Implementation of kernel regression: """ -from pylearn.old_dataset.learner import OfflineLearningAlgorithm +#from pylearn.old_dataset.learner import OfflineLearningAlgorithm from theano import tensor as T from theano.tensor.nnet import prepend_1_to_each_row from theano.scalar import as_scalar @@ -15,7 +15,7 @@ # map a N-vector to a Nx1 matrix col_vector = theano.tensor.DimShuffle((False,),[0,'x']) -class KernelRegression(OfflineLearningAlgorithm): +class KernelRegression():#OfflineLearningAlgorithm): """ Implementation of kernel regression: * the data are n (x_t,y_t) pairs and we want to estimate E[y|x] diff -r 1ee532a6f33b -r bf5c0f797161 pylearn/algorithms/linear_regression.py --- a/pylearn/algorithms/linear_regression.py Mon Sep 12 10:24:24 2011 -0400 +++ b/pylearn/algorithms/linear_regression.py Mon Sep 12 10:48:33 2011 -0400 @@ -4,7 +4,7 @@ the use of theano. """ -from pylearn.old_dataset.learner import OfflineLearningAlgorithm,OnlineLearningAlgorithm +#from pylearn.old_dataset.learner import OfflineLearningAlgorithm,OnlineLearningAlgorithm from theano import tensor as T from theano.tensor.nnet import prepend_1_to_each_row from theano.scalar import as_scalar @@ -12,7 +12,7 @@ import theano import numpy -class LinearRegression(OfflineLearningAlgorithm): +class LinearRegression():#OfflineLearningAlgorithm): """ Implement linear regression, with or without L2 regularization (the former is called Ridge Regression and the latter Ordinary Least Squares). @@ -186,7 +186,7 @@ return p.compute_outputs(inputs) #TODO : an online version -class OnlineLinearRegression(OnlineLearningAlgorithm): +class OnlineLinearRegression():#OnlineLearningAlgorithm): """ Training can proceed sequentially (with multiple calls to update with different disjoint subsets of the training sets). After each call to