summaryrefslogtreecommitdiff
path: root/pca.fut
diff options
context:
space:
mode:
Diffstat (limited to 'pca.fut')
-rw-r--r--pca.fut2
1 files changed, 1 insertions, 1 deletions
diff --git a/pca.fut b/pca.fut
index 8e35c07..29df69c 100644
--- a/pca.fut
+++ b/pca.fut
@@ -72,4 +72,4 @@ entry pcaWithQuantile [n][d] (iters: i32) (q: f64) (k: i64) (X: [n][d]f64) : ([n
let Y = tabulate_2d n (d+1) (\i j -> if j == d then qs[i] else X[i][j])
let (B, U, l) = pca iters (1+k) Y
let Y' = embed B U
- in (map (\x -> x[0:k]) B, (transpose U[0:k])[0:d], map (\x -> x[0:d]) Y', l)
+ in (map (\x -> x[0:k]) B, (transpose U[0:k])[0:d], map (\x -> map (f64.- x[d]) x[0:d]) Y', l)