function Vector::std in Recommender API 7.6
Same name and namespace in other branches
- 6.2 Matrix.php \Vector::std()
1 call to Vector::std()
- Vector::correlation in classes/
Matrix.php - Compute correlation with $vector. No caching option. Works for RealVector. SparseVector needs additional handling.
File
- classes/
Matrix.php, line 231
Class
- Vector
- This is the Vector superclass. @author danithaca
Code
function std($may_cache = FALSE) {
if (!$may_cache || $this->std === NULL) {
// force calculation
$variance = $this
->variance($may_cache);
$this->std = is_nan($variance) ? NAN : sqrt($variance);
}
return $this->std;
}