Ignore:
Timestamp:
Jan 5, 2007, 5:00:15 PM (15 years ago)
Author:
Peter
Message:

Fixes #159. Also removed some inlines in OneDimensionalWeighted? by adding source file. Refs #81

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/regression/OneDimensional.cc

    r727 r729  
    2929
    3030  OneDimensional::OneDimensional(void)
     31    : chisq_(0)
    3132  {
    3233  }
     
    3738
    3839
     40  double OneDimensional::chisq(void) const
     41  {
     42    return chisq_;
     43  }
     44
     45
    3946  double OneDimensional::prediction_error2(const double x) const
    4047  {
    41     return chisq()+standard_error2(x);
     48    return s2()+standard_error2(x);
    4249  }
    4350
     
    6370
    6471
    65   double OneDimensional::r_squared(void) const
     72  double OneDimensional::r2(void) const
    6673  {
    67     return chisq()/variance();
     74    return 1 - chisq()/ap_.y_averager().sum_xx_centered();
    6875  }
    6976
Note: See TracChangeset for help on using the changeset viewer.