dataset-weights returns weights of dataset instances
This commit is contained in:
parent
f776dd312a
commit
0641b48809
1 changed files with 5 additions and 0 deletions
|
@ -297,6 +297,11 @@ If the class is nominal then the string value (not keyword) is returned."
|
||||||
(fn [^Instance i] (.classValue i)))] ;classValue returns the double
|
(fn [^Instance i] (.classValue i)))] ;classValue returns the double
|
||||||
(map class-value (dataset-seq dataset))))
|
(map class-value (dataset-seq dataset))))
|
||||||
|
|
||||||
|
(defn dataset-weights
|
||||||
|
"Returns a lazy-seq of the weights of the dataset instances."
|
||||||
|
[^Instances dataset]
|
||||||
|
(map (fn [^Instance i] (.weight i)) (dataset-seq dataset)))
|
||||||
|
|
||||||
;; manipulation of instances
|
;; manipulation of instances
|
||||||
|
|
||||||
(defn instance-set-class
|
(defn instance-set-class
|
||||||
|
|
Loading…
Reference in a new issue