Liking cljdoc? Tell your friends :D

scicloj.metamorph.ml.gridsearch

Gridsearching as defined by create a map with gridsearch definitions for its values and then gridsearching which produces a sequence of full defined maps.

The initial default implementation uses the sobol sequence.

Gridsearching as defined by create a map with gridsearch definitions
for its values and then gridsearching which produces a sequence of full
defined maps.


The initial default implementation uses the sobol sequence.
raw docstring

categoricalclj

(categorical value-vec)

Given a vector a categorical values create a gridsearch definition.

Given a vector a categorical values create a gridsearch definition.
sourceraw docstring

linearclj

(linear start end)
(linear start end n-steps)
(linear start end n-steps res-dtype-or-space)

Create a gridsearch definition which does a linear search.

  • res-dtype-or-space map be either a datatype keyword or a vector of categorical values.
Create a gridsearch definition which does a linear search.

* res-dtype-or-space map be either a datatype keyword or a vector
  of categorical values.
sourceraw docstring

sobol-gridsearchclj

(sobol-gridsearch opt-map)
(sobol-gridsearch opt-map start-idx)

Given an map of key->values where some of the values are gridsearch definitions produce a sequence of fully defined maps.

user> (require '[tech.v3.ml.gridsearch :as ml-gs])
nil
user> (def opt-map  {:a (ml-gs/categorical [:a :b :c])
                     :b (ml-gs/linear 0.01 1 10)
                     :c :not-searched})
user> opt-map
{:a
 {:tech.v3.ml.gridsearch/type :linear,
  :start 0.0,
  :end 2.0,
  :n-steps 3,
  :result-space [:a :b :c]}
  ...

user> (ml-gs/sobol-gridsearch opt-map)
({:a :b, :b 0.56, :c :not-searched}
 {:a :c, :b 0.22999999999999998, :c :not-searched}
 {:a :b, :b 0.78, :c :not-searched}
...
Given an map of key->values where some of the values are gridsearch definitions
  produce a sequence of fully defined maps.


```clojure
user> (require '[tech.v3.ml.gridsearch :as ml-gs])
nil
user> (def opt-map  {:a (ml-gs/categorical [:a :b :c])
                     :b (ml-gs/linear 0.01 1 10)
                     :c :not-searched})
user> opt-map
{:a
 {:tech.v3.ml.gridsearch/type :linear,
  :start 0.0,
  :end 2.0,
  :n-steps 3,
  :result-space [:a :b :c]}
  ...

user> (ml-gs/sobol-gridsearch opt-map)
({:a :b, :b 0.56, :c :not-searched}
 {:a :c, :b 0.22999999999999998, :c :not-searched}
 {:a :b, :b 0.78, :c :not-searched}
...
```
  
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close