Ignore:
Timestamp:
Jan 6, 2007, 5:06:19 PM (16 years ago)
Author:
Peter
Message:

added test for multidimensional weighted and straight version

File:
1 edited

Legend:

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

    r727 r731  
    2626#include "yat/utility/vector.h"
    2727
     28#include <cassert>
     29
    2830namespace theplu {
    2931namespace yat {
     
    5254  void MultiDimensional::fit(const utility::matrix& x, const utility::vector& y)
    5355  {
     56    assert(x.rows()==y.size());
    5457    covariance_=utility::matrix(x.columns(),x.columns());
    5558    fit_parameters_=utility::vector(x.columns());
     
    7679  double MultiDimensional::predict(const utility::vector& x) const
    7780  {
     81    assert(x.size()==fit_parameters_.size());
    7882    return fit_parameters_ * x;
    7983  }
Note: See TracChangeset for help on using the changeset viewer.