Changeset 202


Ignore:
Timestamp:
Nov 1, 2004, 4:00:41 PM (19 years ago)
Author:
Peter
Message:

adding classes for Regression

Location:
trunk/src
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Makefile.am

    r198 r202  
    1414  Kernel.cc kNNI.cc matrix.cc Merge.cc NNI.cc PCA.cc \
    1515  PolynomialKernelFunction.cc random_singleton.cc \
     16  RegressionLinear.cc RegressionLocal.cc RegressionNaive.cc ROC.cc \
     17  Score.cc Statistics.cc \
     18  PolynomialKernelFunction.cc random_singleton.cc \
    1619  RegressionLinear.cc ROC.cc Score.cc Statistics.cc \
    1720  SVD.cc SVM.cc tScore.cc vector.cc WeightedAverager.cc WeNNI.cc
     
    2831  KernelFunction.h kNNI.h matrix.h Merge.h NNI.h PCA.h Pearson.h \
    2932  PolynomialKernelFunction.h random_singleton.h \
     33  Regression.h RegressionLinear.h RegressionLocal.h RegressionNaive.h \
     34  ROC.h Score.h \
     35  PolynomialKernelFunction.h random_singleton.h \
    3036  RegressionLinear.h ROC.h Score.h \
    3137  Statistics.h stl_utility.h SVD.h SVM.h tScore.h vector.h WeNNI.h \
  • trunk/src/RegressionLinear.cc

    r196 r202  
    11// $Id$
    22
     3// Header
    34#include "RegressionLinear.h"
    45
     6// C++_tools
     7#include "Regression.h"
    58#include "vector.h"
    69
     
    1316 
    1417  RegressionLinear::RegressionLinear(void)
    15     : cov00_(0), cov01_(0), cov11_(0), k_(0), m_(0), sumsq_(0)
     18    : Regression(), cov00_(0), cov01_(0), cov11_(0), k_(0), m_(0), sumsq_(0)
    1619  {
    1720  }
  • trunk/src/RegressionLinear.h

    r196 r202  
    66// C++ tools include
    77/////////////////////
     8#include "Regression.h"
    89#include "vector.h"
    910
     
    2021
    2122 
    22   class RegressionLinear
     23  class RegressionLinear : public Regression
    2324  {
    2425 
     
    3031
    3132    ///
     33    /// Copy Constructor. (not implemented)
     34    ///
     35    RegressionLinear(const RegressionLinear&);
     36
     37    ///
    3238    /// Destructor
    3339    ///
     
    3642    ///
    3743    /// This function computes the best-fit linear regression
    38     /// coefficients (k,m) of the model  \f$ y = kx + m \f$ from from
     44    /// coefficients (k,m) of the model  \f$ y = kx + m \f$ from
    3945    /// vectors \a x and \a y, by minimizing \f$ \sum{(kx_i+m-x_i)^2}
    4046    /// \f$.
     
    4854    /// This function computes the best-fit linear regression
    4955    /// coefficients (k,m) of the model \f$ y = kx + m \f$ from from
    50     /// vectors \a x and \a y, by minimizing \f$ \sum w_i(kx_i+m-x_i)^2
    51     /// \f$. The weight \f$ w_i \f$ is the inverse of the variance for
    52     /// \f$ y_i \f$
     56    /// vectors \a x and \a y, by minimizing \f$ \sum
     57    /// w_i(kx_i+m-x_i)^2 \f$.
    5358    ///
    54     inline int fit_weigted(gslapi::vector x, gslapi::vector y, gslapi::vector w)
     59    inline int fit_weighted(const gslapi::vector x, const gslapi::vector y,
     60                           const gslapi::vector w)
    5561      { return gsl_fit_wlinear_vector(x.gsl_vector_pointer(),
    5662                                      w.gsl_vector_pointer(),
Note: See TracChangeset for help on using the changeset viewer.