Permalink
Browse files

comments and cK = 100

  • Loading branch information...
1 parent 2699c52 commit 1bd778a39ce127d4c4dbcf2183eb8425129cc425 @kirel committed May 4, 2010
Showing with 2 additions and 1 deletion.
  1. +1 −0 Classifier.hs
  2. +1 −1 bench.hs
View
1 Classifier.hs
@@ -73,6 +73,7 @@ insertWithLimit limit sample m = alter alterLim (fromJust $ identifier sample) m
newClassifier :: Int -> IO (Classifier s)
newClassifier k = atomically $ liftM (Classifier k) (newTVar Data.Map.empty)
+-- FIXME sample limit is hardcoded here
trainClassifier :: Sample s => Classifier s -> s -> IO ()
trainClassifier _ sample | identifier sample == Nothing = error "Can only train samples of known classes."
trainClassifier (Classifier _ t) sample = atomically $ Classifier.update t (insertWithLimit 20 sample)
View
2 bench.hs
@@ -56,7 +56,7 @@ randomStroke = (strokeFromList . randoms . mkStdGen)
-- stop <- getPOSIXTime
-- print $ stop - start
-cK = 10
+cK = 100
strokesize = 30
num = 20000
stroke = take strokesize $ (randomStroke 1)

0 comments on commit 1bd778a

Please sign in to comment.