Pārlūkot izejas kodu

bugfix copy-constructor LinRegression

Frank Prüfer 11 gadi atpakaļ
vecāks
revīzija
e3538dc5c2
1 mainītis faili ar 0 papildinājumiem un 19 dzēšanām
  1. 0 19
      regression/linregression/LinRegression.cpp

+ 0 - 19
regression/linregression/LinRegression.cpp

@@ -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);
   }