summaryrefslogtreecommitdiff
path: root/examples/pca1.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-10-01 15:04:16 +0000
committerAlberto Ruiz <aruiz@um.es>2007-10-01 15:04:16 +0000
commitc99b8fd6e3f8a2fb365ec12baf838f864b118ece (patch)
tree11b5b8515861fe88d547253ae10c2182d5fadaf2 /examples/pca1.hs
parent768f08d4134a066d773d56a9c03ae688e3850352 (diff)
LinearAlgebra and GSL moved to Numeric
Diffstat (limited to 'examples/pca1.hs')
-rw-r--r--examples/pca1.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/pca1.hs b/examples/pca1.hs
index 2c5074d..4ad8720 100644
--- a/examples/pca1.hs
+++ b/examples/pca1.hs
@@ -1,6 +1,6 @@
1-- Principal component analysis 1-- Principal component analysis
2 2
3import LinearAlgebra 3import Numeric.LinearAlgebra
4import System.Directory(doesFileExist) 4import System.Directory(doesFileExist)
5import System(system) 5import System(system)
6import Control.Monad(when) 6import Control.Monad(when)
@@ -26,7 +26,7 @@ pca n dataSet = (encode,decode)
26 decode x = x <> vp + m 26 decode x = x <> vp + m
27 m = mean dataSet 27 m = mean dataSet
28 c = cov dataSet 28 c = cov dataSet
29 (_,v) = eigS c 29 (_,v) = eigSH c
30 vp = takeRows n (trans v) 30 vp = takeRows n (trans v)
31 31
32main = do 32main = do