BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members
BALL::QSAR::Statistics Class Reference

#include <BALL/QSAR/statistics.h>

Public Member Functions

Constructors and Destructors
 Statistics ()
 
 ~Statistics ()
 

Static Public Member Functions

static functions
static void scaling (std::vector< double > &v)
 
static void scaling (std::vector< std::vector< double > > &m)
 
static void centering (std::vector< std::vector< double > > &m)
 
static void centering (std::vector< double > &v)
 
static void centering (vector< double > &v, double &mean, double &std)
 
static double getVariance (const std::vector< double > &v, double mean=-1)
 
static double getStddev (const vector< double > &v, double mean=-1)
 
static double getCovariance (const vector< double > &v1, const vector< double > &v2, double mean1, double mean2)
 
static double getMean (const std::vector< double > &v)
 
static double getRowCovariance (const vector< vector< double > > &v, int row1, int row2, double mean1=-1, double mean2=-1, std::multiset< int > *features_to_use=0)
 
static double getRowMean (const vector< vector< double > > &v, int row, std::multiset< int > *features_to_use=0)
 
static double getRowVariance (const vector< vector< double > > &v, int row, double mean=-1, std::multiset< int > *features_to_use=0)
 
static double getRowStddev (const vector< vector< double > > &v, int row, double mean=-1, std::multiset< int > *features_to_use=0)
 
static void centering (BALL::Matrix< double > &m)
 
static void centering (BALL::Matrix< double > &m, int col)
 
static double getMean (const BALL::Matrix< double > &m, int col)
 
static double getVariance (const BALL::Matrix< double > &m, int col, double mean=-1)
 
static double getStddev (const BALL::Matrix< double > &m, int col, double mean=-1)
 
static double getCovariance (const BALL::Matrix< double > &m, int col1, int col2, double mean1=-1, double mean2=-1)
 
static double sq (const BALL::Matrix< double > &m, int col, double mean=-1)
 
static double distance (const BALL::Matrix< double > &m, int &row1, int &row2, double &p)
 
static double distance (const BALL::Matrix< double > &m1, const BALL::Matrix< double > &m2, int &row1, int &row2, double &p)
 
static double distance (const BALL::Matrix< double > &m1, const BALL::Matrix< double > &m2, int &row1, int &row2, String &f, String &g)
 
static double euclDistance (const BALL::Matrix< double > &m1, const BALL::Matrix< double > &m2, int row1, int row2)
 
static double euclNorm (const Vector< double > &cv)
 
static double euclDistance (const Vector< double > &c1, const Vector< double > &c2)
 
static double scalarProduct (const Vector< double > &cv)
 

Detailed Description

class for statistical correction of input-data

Definition at line 42 of file statistics.h.

Constructor & Destructor Documentation

BALL::QSAR::Statistics::Statistics ( )
inline

defaut constructor

Definition at line 49 of file statistics.h.

BALL::QSAR::Statistics::~Statistics ( )
inline

defaut destructor

Definition at line 52 of file statistics.h.

Member Function Documentation

static void BALL::QSAR::Statistics::centering ( std::vector< std::vector< double > > &  m)
static

centers each colum of the given vector-based matrix to a variance of 1 and mean of 0

static void BALL::QSAR::Statistics::centering ( std::vector< double > &  v)
static

centers the given vector to a variance of 1 and mean of 0

static void BALL::QSAR::Statistics::centering ( vector< double > &  v,
double mean,
double std 
)
static
centers the given vector to a variance of 1 and mean of 0  
Parameters
meanthe mean of v will be saved here
stdthe standart deviation of v will be saved here
static void BALL::QSAR::Statistics::centering ( BALL::Matrix< double > &  m)
static

scales each column of the given newmat-matrix to a variance of 1

static void BALL::QSAR::Statistics::centering ( BALL::Matrix< double > &  m,
int  col 
)
static

scales column col of the given newmat-matrix m to a variance of 1

static double BALL::QSAR::Statistics::distance ( const BALL::Matrix< double > &  m,
int &  row1,
int &  row2,
double p 
)
static

calculates polynomial distance between two rows of newmat-matrix m

static double BALL::QSAR::Statistics::distance ( const BALL::Matrix< double > &  m1,
const BALL::Matrix< double > &  m2,
int &  row1,
int &  row2,
double p 
)
static
calculates polynomial distance between row1 of BALL::Matrix<double> m1 and row2 of BALL::Matrix<double> m2.\n

m1 and m2 must therefore have the same number of columns.

static double BALL::QSAR::Statistics::distance ( const BALL::Matrix< double > &  m1,
const BALL::Matrix< double > &  m2,
int &  row1,
int &  row2,
String f,
String g 
)
static
calculates the distance between row1 of BALL::Matrix<double> m1 and row2 of BALL::Matrix<double> m2 according to the given equations 
Parameters
fequation f, determines how elements "x1" of row1 are charged against elements "x2" of row2. Use "x1" and "x2" in the String, e.g. "x1*x2"
gequation g, determines what is to be done with the calculated "sum" over all elements (use "sum" in String); e.g. "sum^0.5" => euclidean distance if f=="x1*x2"
static double BALL::QSAR::Statistics::euclDistance ( const BALL::Matrix< double > &  m1,
const BALL::Matrix< double > &  m2,
int  row1,
int  row2 
)
static
calculates euclidean distance between row1 of BALL::Matrix<double> m1 and row2 of BALL::Matrix<double> m2 as \form#82\n

m1 and m2 must therefore have the same number of columns.

static double BALL::QSAR::Statistics::euclDistance ( const Vector< double > &  c1,
const Vector< double > &  c2 
)
static

Returns the euclidician difference between two ColumnVectors as $ sqrt(\sum_i (cv1_i-cv2_i)^2) $

static double BALL::QSAR::Statistics::euclNorm ( const Vector< double > &  cv)
static

Returns the euclidic norm of a ColumnVector as $ sqrt(\sum_i cv_i^2) $

static double BALL::QSAR::Statistics::getCovariance ( const vector< double > &  v1,
const vector< double > &  v2,
double  mean1,
double  mean2 
)
static

calculate covariance between two given vectors

static double BALL::QSAR::Statistics::getCovariance ( const BALL::Matrix< double > &  m,
int  col1,
int  col2,
double  mean1 = -1,
double  mean2 = -1 
)
static

calculates covariance between columns col1 and col2 of matrix m

static double BALL::QSAR::Statistics::getMean ( const std::vector< double > &  v)
static

calculate mean of given vector

static double BALL::QSAR::Statistics::getMean ( const BALL::Matrix< double > &  m,
int  col 
)
static

calculates mean of column col of newmat-matrix m

static double BALL::QSAR::Statistics::getRowCovariance ( const vector< vector< double > > &  v,
int  row1,
int  row2,
double  mean1 = -1,
double  mean2 = -1,
std::multiset< int > *  features_to_use = 0 
)
static
calculates covarianve between two rows of the given matrix 
Parameters
features_to_useif specified, only the contained features are used for calculation of the covariance
static double BALL::QSAR::Statistics::getRowMean ( const vector< vector< double > > &  v,
int  row,
std::multiset< int > *  features_to_use = 0 
)
static
calculates mean of a row of the given matrix 
Parameters
features_to_useif specified, only the contained features are used for calculation of the mean
static double BALL::QSAR::Statistics::getRowStddev ( const vector< vector< double > > &  v,
int  row,
double  mean = -1,
std::multiset< int > *  features_to_use = 0 
)
static
calculates standard deviation of a row of the given matrix 
Parameters
features_to_useif specified, only the contained features are used for calculation of the standard deviation
static double BALL::QSAR::Statistics::getRowVariance ( const vector< vector< double > > &  v,
int  row,
double  mean = -1,
std::multiset< int > *  features_to_use = 0 
)
static
calculates variance of a row of the given matrix 
Parameters
features_to_useif specified, only the contained features are used for calculation of the variance
static double BALL::QSAR::Statistics::getStddev ( const vector< double > &  v,
double  mean = -1 
)
static

calculate standart deviation of a given vector

static double BALL::QSAR::Statistics::getStddev ( const BALL::Matrix< double > &  m,
int  col,
double  mean = -1 
)
static

calculated standard deviation of column col of matrix m

static double BALL::QSAR::Statistics::getVariance ( const std::vector< double > &  v,
double  mean = -1 
)
static

calculate variance of a given vector

static double BALL::QSAR::Statistics::getVariance ( const BALL::Matrix< double > &  m,
int  col,
double  mean = -1 
)
static

calculates variance of column col of newmat-matrix m

static double BALL::QSAR::Statistics::scalarProduct ( const Vector< double > &  cv)
static

returns the scalar product $ cv^T*cv = \sum_i cv_i^2 $

static void BALL::QSAR::Statistics::scaling ( std::vector< double > &  v)
static

scales the given vector to a variance of 1

static void BALL::QSAR::Statistics::scaling ( std::vector< std::vector< double > > &  m)
static

scales each column of the given vector-based matrix to a variance of 1

static double BALL::QSAR::Statistics::sq ( const BALL::Matrix< double > &  m,
int  col,
double  mean = -1 
)
static

calculates the sum-of-square of column col of newmat-matrix m