-
Notifications
You must be signed in to change notification settings - Fork 13
/
core.clj
62 lines (46 loc) · 1.85 KB
/
core.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
(ns scicloj.ml.core
"Core functions for machine learninig and pipeline execution.
Requiring this namesspace registers as well the model in:
* scicloj.ml.smile.classification
* scicloj.ml.smile.regression
* scicloj.ml.xgboost
Functions are re-exported from:
* scicloj.metamorph.ml.*
* scicloj.metamorph.core
"
(:refer-clojure :exclude [boolean concat drop first group-by last rand-nth shuffle])
(:require [tech.v3.datatype.export-symbols :as exporter]
[scicloj.ml.utils :refer :all]
[scicloj.metamorph.core]
[scicloj.metamorph.ml]
[scicloj.metamorph.ml.loss]
[scicloj.metamorph.ml.gridsearch]
[scicloj.metamorph.ml.classification]
;; register models
[scicloj.ml.smile.classification]
[scicloj.ml.smile.regression]
[scicloj.ml.smile.clustering]
[scicloj.ml.smile.projections]
[scicloj.ml.xgboost]
[scicloj.ml.smile.manifold]))
(export-all [scicloj.metamorph.ml
scicloj.metamorph.ml.loss
scicloj.metamorph.ml.classification
scicloj.metamorph.ml.gridsearch]
[model safe-inc])
(exporter/export-symbols scicloj.metamorph.core
pipeline
->pipeline
lift
do-ctx
;; def-ctx ; cannot be exported, is tehreofre copied below
fit
pipe-it
fit-pipe
transform-pipe)
(defmacro def-ctx
"Convenience macro for defining pipelined operations that
bind the current value of the context to a var, for simple
debugging purposes."
[varname]
`(do-ctx (fn [ctx#] (def ~varname ctx#))))