wdm
- wdm(x: numpy.ndarray, y: numpy.ndarray, method: str, weights: numpy.ndarray = array([], dtype=float64), remove_missing: bool = True) float
Calculates (weighted) dependence measures.
This function computes various measures of dependence between two variables, optionally using observation weights.
- Parameters:
- x, y
Input data vectors.
- method
The dependence measure to compute. Possible values are:
"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\)
- weights
Optional vector of observation weights.
- remove_missing
If
True, all observations containing aNaNare removed. Otherwise, an error is raised if missing values are present.
- Returns:
- float
The computed dependence measure.