Statistics
| Revision:

root / branches / pthreads-737 / src / linad99 / cregress.cpp @ 765

History | View | Annotate | Download (461 Bytes)

1
/*
2
 * $Id: cregress.cpp 542 2012-07-10 21:04:06Z johnoel $
3
 *
4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California 
6
 */
7
/**
8
 * \file
9
 * Description not yet available.
10
 */
11
#include <fvar.hpp>
12

    
13
/**
14
 * Description not yet available.
15
 * \param
16
 */
17
double regression(const dvector& obs, const dvector& pred)
18
{
19
  double nobs=double(size_count(obs));
20
  double vhat=norm2(obs-pred);
21
  vhat/=nobs;
22
  return (.5*nobs*log(vhat));
23
}