Changeset 4078


Ignore:
Timestamp:
Aug 26, 2021, 8:52:34 AM (3 months ago)
Author:
Peter
Message:

remove trailing ws

Location:
trunk/yat/regression
Files:
2 edited

Legend:

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

    r2919 r4078  
    6060  }
    6161
    62   void Linear::fit(const utility::VectorBase& x, const utility::VectorBase& y) 
     62  void Linear::fit(const utility::VectorBase& x, const utility::VectorBase& y)
    6363  {
    6464    ap_.reset();
     
    7777
    7878  double Linear::predict(const double x) const
    79   { 
    80     return alpha_ + beta_ * (x - ap_.x_averager().mean()); 
     79  {
     80    return alpha_ + beta_ * (x - ap_.x_averager().mean());
    8181  }
    8282
     
    8989  {
    9090    return alpha_var_+beta_var_*(x-ap_.x_averager().mean())*
    91       (x-ap_.x_averager().mean()); 
     91      (x-ap_.x_averager().mean());
    9292  }
    9393
  • trunk/yat/regression/Linear.h

    r2202 r4078  
    3636
    3737  /**
    38      @brief linear regression.   
    39      
     38     @brief linear regression.
     39
    4040     Data are modeled as \f$ y_i = \alpha + \beta (x_i-m_x) +
    4141     \epsilon_i \f$.
    4242  */
    43   class Linear : public OneDimensional 
     43  class Linear : public OneDimensional
    4444  {
    45  
     45
    4646  public:
    4747    ///
     
    5151
    5252    ///
    53     /// @brief The destructor 
     53    /// @brief The destructor
    5454    ///
    5555    virtual ~Linear(void);
    56          
     56
    5757    /**
    5858       The parameter \f$ \alpha \f$ is estimated as \f$
    5959       \frac{1}{n}\sum y_i \f$
    60        
     60
    6161       @return the parameter \f$ \alpha \f$
    6262    */
     
    6666       The variance is estimated as \f$ \frac{s^2}{n}
    6767       \f$ where \f$ s^2 = \frac{\sum \epsilon^2}{n-2} \f$
    68        
     68
    6969       @return variance of parameter \f$ \alpha \f$
    7070    */
     
    7474       The parameter \f$ \beta \f$ is estimated as \f$
    7575       \frac{\textrm{Cov}(x,y)}{\textrm{Var}(x)} \f$
    76        
     76
    7777       @return the parameter \f$ \beta \f$
    7878    */
     
    9393    */
    9494    void fit(const utility::VectorBase& x, const utility::VectorBase& y) ;
    95    
     95
    9696    ///
    97     /// @return \f$ \alpha + \beta x \f$ 
     97    /// @return \f$ \alpha + \beta x \f$
    9898    ///
    9999    double predict(const double x) const;
     
    109109       The error of the model is estimated as \f$
    110110       \textrm{alpha\_err}^2+\textrm{beta\_err}^2*(x-m_x)*(x-m_x)\f$
    111    
     111
    112112       @return estimated error of model in @a x
    113113    */
Note: See TracChangeset for help on using the changeset viewer.