Changeset 1794


Ignore:
Timestamp:
Feb 11, 2009, 6:04:10 PM (11 years ago)
Author:
Peter
Message:

adding missing implementations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/PearsonCorrelation.cc

    r1487 r1794  
    44  Copyright (C) 2004, 2005 Peter Johansson
    55  Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson
    6   Copyright (C) 2008 Peter Johansson
     6  Copyright (C) 2008, 2009 Peter Johansson
    77
    88  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    3333  }
    3434
     35
    3536  PearsonCorrelation::~PearsonCorrelation(void)
    3637  {
    3738  }
     39
     40
     41  void PearsonCorrelation::add(double value, bool target, double weight)
     42  {
     43    ap_.add(value, target ? 1.0 : -1.0, weight, 1.0);
     44  }
     45
     46
     47  double PearsonCorrelation::score(void) const
     48  {
     49    return ap_.correlation();
     50  }
     51
    3852
    3953  double PearsonCorrelation::p_value_one_sided() const
Note: See TracChangeset for help on using the changeset viewer.