Permalink
Browse files

Merge pull request #2 from jaley/master

Fix sparse input data (missing attributes).
  • Loading branch information...
2 parents c9b0819 + b24185d commit 9ad60145b1b70ca94dc4b30c1119be7b8a26e84b @bmabey bmabey committed Sep 27, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/clj_ml/data.clj
View
3 src/clj_ml/data.clj
@@ -130,8 +130,7 @@
([dataset vector]
(make-instance dataset 1 vector))
([dataset weight vector]
- (let [^Instance inst (new Instance
- (count vector))]
+ (let [^Instance inst (new Instance (.numAttributes ^ClojureInstances dataset))]
(do (.setDataset inst dataset)
(loop [vs vector
c 0]

0 comments on commit 9ad6014

Please sign in to comment.