wdm Namespace Reference

Weighted dependence measures. More...

Classes

class  Indep_test
 

Functions

double wdm (const Eigen::VectorXd &x, const Eigen::VectorXd &y, std::string method, Eigen::VectorXd weights=Eigen::VectorXd(), bool remove_missing=true)
 
Eigen::MatrixXd wdm (const Eigen::MatrixXd &x, std::string method, Eigen::VectorXd weights=Eigen::VectorXd(), bool remove_missing=true)
 
double wdm (std::vector< double > x, std::vector< double > y, std::string method, std::vector< double > weights=std::vector< double >(), bool remove_missing=true)
 

Detailed Description

Weighted dependence measures.

Function Documentation

double wdm::wdm ( std::vector< double >  x,
std::vector< double >  y,
std::string  method,
std::vector< double >  weights = std::vector<double>(),
bool  remove_missing = true 
)
inline

calculates (weighted) dependence measures.

Parameters
x,yinput data.
methodthe dependence measure; see details for possible values.
weightsan optional vector of weights for the data.
remove_missingif true, all observations containing a nan are removed; otherwise throws an error if nans are present.

Available methods:

  • "pearson", "prho", "cor": Pearson correlation
  • "spearman", "srho", "rho": Spearman's \( \rho \)
  • "kendall", "ktau", "tau": Kendall's \( \tau \)
  • "blomqvist", "bbeta", "beta": Blomqvist's \( \beta \)
  • "hoeffding", "hoeffd", "d": Hoeffding's \( D \)
Returns
the dependence measure
double wdm::wdm ( const Eigen::VectorXd &  x,
const Eigen::VectorXd &  y,
std::string  method,
Eigen::VectorXd  weights = Eigen::VectorXd(),
bool  remove_missing = true 
)
inline

calculates (weighted) dependence measures.

Parameters
x,yinput data.
methodthe dependence measure; see details for possible values.
weightsan optional vector of weights for the data.
remove_missingif true, all observations containing a nan are removed; otherwise throws an error if nans are present.

Available methods:

  • "pearson", "prho", "cor": Pearson correlation
  • "spearman", "srho", "rho": Spearman's \( \rho \)
  • "kendall", "ktau", "tau": Kendall's \( \tau \)
  • "blomqvist", "bbeta", "beta": Blomqvist's \( \beta \)
  • "hoeffding", "hoeffd", "d": Hoeffding's \( D \)
Returns
the dependence measure
Eigen::MatrixXd wdm::wdm ( const Eigen::MatrixXd &  x,
std::string  method,
Eigen::VectorXd  weights = Eigen::VectorXd(),
bool  remove_missing = true 
)
inline

calculates a matrix of (weighted) dependence measures.

Parameters
xinput data.
methodthe dependence measure; see details for possible values.
weightsan optional vector of weights for the data.
remove_missingif true, all observations containing a nan are removed; otherwise throws an error if nans are present.

Available methods:

  • "pearson", "prho", "cor": Pearson correlation
  • "spearman", "srho", "rho": Spearman's \( \rho \)
  • "kendall", "ktau", "tau": Kendall's \( \tau \)
  • "blomqvist", "bbeta", "beta": Blomqvist's \( \beta \)
  • "hoeffding", "hoeffd", "d": Hoeffding's \( D \)
Returns
a matrix of pairwise dependence measures.