Skip to content

Commit c917c2d

Browse files
committed
Fixing unit tests
1 parent 877c7eb commit c917c2d

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
org.apache.spark/spark-mllib_2.12 {:mvn/version "3.0.1"}
9898
org.apache.spark/spark-sql_2.12 {:mvn/version "3.0.1"}
9999
org.apache.spark/spark-streaming_2.12 {:mvn/version "3.0.1"}
100-
org.tribuo/tribuo-all {:mvn/version "4.2.0" :extension "pom"}
100+
org.tribuo/tribuo-all {:mvn/version "4.3.1" :extension "pom"}
101101
}
102102
:extra-paths ["neanderthal" "test"]}
103103

src/tech/v3/dataset.clj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@
7373
- `:disable-comment-skipping?` - As default, the `#` character is recognised as a
7474
line comment when found in the beginning of a line of text in a CSV file,
7575
and the row will be ignored. Set `true` to disable this behavior.
76-
- `:disable-na-as-missing?` - As default, the string \"NA\" is (case-insensitively)
77-
parsed as `nil`. Set `false` to disable this behavior.
7876
- `:max-chars-per-column` - Defaults to 4096. Columns with more characters that this
7977
will result in an exception.
8078
- `:max-num-columns` - Defaults to 8192. CSV,TSV files with more columns than this
@@ -477,8 +475,8 @@ null [6 3]:
477475

478476

479477
(defn concat
480-
"Concatenate datasets in place using a copying-concatenation.
481-
See also concat-inplace as it may be more efficient for your use case if you have
478+
"Concatenate datasets using a copying-concatenation.
479+
See also [[concat-inplace]] as it may be more efficient for your use case if you have
482480
a small number (like less than 3) of datasets."
483481
([dataset & args]
484482
(apply tech.v3.dataset.base/concat dataset args))
@@ -644,9 +642,9 @@ null [6 3]:
644642

645643

646644
(defn group-by
647-
"Produce a map of key-fn-value->dataset. The argument to key-fn
645+
"Produce a map of key-fn-value->dataset. The argument to key-fn
648646
is a map of colname->column-value representing a row in dataset.
649-
Each dataset in the resulting map contains all and only rows
647+
Each dataset in the resulting map contains all and only rows
650648
that produce the same key-fn-value.
651649
652650
Options - options are passed into dtype arggroup:

src/tech/v3/dataset/metamorph.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ null [6 3]:
318318

319319

320320
(defn concat
321-
"Concatenate datasets in place using a copying-concatenation.
322-
See also concat-inplace as it may be more efficient for your use case if you have
321+
"Concatenate datasets using a copying-concatenation.
322+
See also [[concat-inplace]] as it may be more efficient for your use case if you have
323323
a small number (like less than 3) of datasets."
324324
([& args]
325325
(apply tech.v3.dataset.metamorph-api/concat args))
@@ -489,9 +489,9 @@ null [6 3]:
489489

490490

491491
(defn group-by
492-
"Produce a map of key-fn-value->dataset. The argument to key-fn
492+
"Produce a map of key-fn-value->dataset. The argument to key-fn
493493
is a map of colname->column-value representing a row in dataset.
494-
Each dataset in the resulting map contains all and only rows
494+
Each dataset in the resulting map contains all and only rows
495495
that produce the same key-fn-value.
496496
497497
Options - options are passed into dtype arggroup:

test/tech/v3/dataset/mapseq_test.clj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@
8080

8181
;;forward map from input value to encoded value.
8282
;;After ETL, column values are all doubles
83-
(let [apple-value (-> (get (ds-mod/inference-target-label-map dataset) :apple)
84-
double)]
83+
(let [apple-value (get (ds-mod/inference-target-label-map dataset) :apple)]
8584
(is (= #{:apple}
8685
(as-> dataset ds
8786
(ds/filter ds #(= apple-value (:fruit-name %)))
@@ -172,7 +171,7 @@
172171
:apple :fruit-name-apple,
173172
:lemon :fruit-name-lemon},
174173
:src-column :fruit-name,
175-
:result-datatype :float64}
174+
:result-datatype :int64}
176175
(into {} (first (ds-cat/dataset->one-hot-maps dataset)))))
177176
(is (= #{:mass :fruit-name-orange :fruit-name-mandarin :width :fruit-name-apple :color-score
178177
:fruit-name-lemon :height}

0 commit comments

Comments
 (0)