stat: append To suffix to extraction methods

This commit is contained in:
kortschak
2017-06-21 14:00:44 +09:30
committed by Dan Kortschak
parent eac07bbebd
commit 03a2dba19b
5 changed files with 24 additions and 24 deletions

View File

@@ -35,12 +35,12 @@ func ExamplePC() {
if !ok {
return
}
fmt.Printf("variances = %.4f\n\n", pc.Vars(nil))
fmt.Printf("variances = %.4f\n\n", pc.VarsTo(nil))
// Project the data onto the first 2 principal components.
k := 2
var proj mat.Dense
proj.Mul(iris, pc.Vectors(nil).Slice(0, d, 0, k))
proj.Mul(iris, pc.VectorsTo(nil).Slice(0, d, 0, k))
fmt.Printf("proj = %.4f", mat.Formatted(&proj, mat.Prefix(" ")))