|
@@ -103,15 +103,13 @@ void LinRegression::teach ( const NICE::VVector & x, const NICE::Vector & y ){
|
|
|
params.multiply(tmpAlphaInv,rhs);
|
|
|
|
|
|
alpha = params.std_vector();
|
|
|
-
|
|
|
- cerr<<"Alpha-Vektor: ";
|
|
|
- for(uint i=0;i<alpha.size();i++){
|
|
|
- cerr<<alpha[i]<<" ";
|
|
|
- }
|
|
|
- cerr<<endl;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+std::vector<double> LinRegression::getModelParams(){
|
|
|
+ return alpha;
|
|
|
+}
|
|
|
+
|
|
|
double LinRegression::predict ( const NICE::Vector & x ){
|
|
|
double y;
|
|
|
if ( dim == 2 ){ //two-dimensional least squares
|