|
@@ -29,38 +29,20 @@ LinRegression::LinRegression(uint dimension)
|
|
|
LinRegression::LinRegression ( const LinRegression & src ) :
|
|
|
RegressionAlgorithm ( src )
|
|
|
{
|
|
|
-<<<<<<< HEAD
|
|
|
- dim = src.dim;
|
|
|
-=======
|
|
|
dim = src.dim;
|
|
|
modelParams = src.modelParams;
|
|
|
->>>>>>> frank
|
|
|
}
|
|
|
|
|
|
LinRegression::~LinRegression()
|
|
|
{
|
|
|
}
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
LinRegression* LinRegression::clone ( void ) const
|
|
|
{
|
|
|
return new LinRegression(*this);
|
|
|
}
|
|
|
|
|
|
|
|
|
-void LinRegression::teach ( const NICE::VVector & x, const NICE::Vector & y ){
|
|
|
-
|
|
|
- if (dim == 0) //dimension not specified via constructor
|
|
|
- {
|
|
|
- dim = x[0].size()+1; //use full dimension of data
|
|
|
- }
|
|
|
-
|
|
|
- cerr<<"dim: "<<dim<<endl;
|
|
|
- cerr<<"examples: "<<x.size()<<endl;
|
|
|
-
|
|
|
- for ( uint i = 0;i < dim;i++ ) //initialize vector of model parameters
|
|
|
- {
|
|
|
-=======
|
|
|
void LinRegression::teach ( const NICE::VVector & x, const NICE::Vector & y )
|
|
|
{
|
|
|
if (dim == 0){ //dimension not specified via constructor
|
|
@@ -68,7 +50,6 @@ void LinRegression::teach ( const NICE::VVector & x, const NICE::Vector & y )
|
|
|
}
|
|
|
|
|
|
for ( uint i = 0;i < dim;i++ ){ //initialize vector of model parameters
|
|
|
->>>>>>> frank
|
|
|
modelParams.push_back(0.0);
|
|
|
}
|
|
|
|