Liking cljdoc? Tell your friends :D

cortex.experiment.util


batch-pad-seqclj

(batch-pad-seq batch-size item-seq)

Ensure a sequence of things is of length commensurate with batch-size

Ensure a sequence of things is of length commensurate with batch-size
raw docstring

create-dataset-from-folderclj

(create-dataset-from-folder
  folder-name
  class-mapping
  &
  {:keys [image-aug-fn post-process-fn datatype colorspace normalize batch-size]
   :or {datatype :float colorspace :gray normalize :true batch-size 1}})

Turns a folder of folders of png images into a dataset (a sequence of maps).

Turns a folder of folders of png images into a dataset (a sequence of maps).
raw docstring

infinite-class-balanced-datasetclj

(infinite-class-balanced-dataset map-seq
                                 &
                                 {:keys [class-key epoch-size]
                                  :or {class-key :labels epoch-size 1024}})

Given a dataset, returns an infinite sequence of maps perfectly balanced by class.

Given a dataset, returns an infinite sequence of maps perfectly
balanced by class.
raw docstring

infinite-class-balanced-seqclj

(infinite-class-balanced-seq map-seq & {:keys [class-key]})

infinite-datasetclj

(infinite-dataset map-seq & {:keys [epoch-size] :or {epoch-size 1024}})

Given a finite dataset, generate an infinite sequence of maps partitioned by :epoch-size

Given a finite dataset, generate an infinite sequence of maps partitioned
by :epoch-size
raw docstring

label->one-hotclj

(label->one-hot class-names label)

Given a vector of class-names and a label, return a one-hot vector based on the position in class-names. E.g. (label->vec [:a :b :c :d] :b) => [0 1 0 0]

Given a vector of class-names and a label, return a one-hot vector based on
the position in class-names.
E.g.  (label->vec [:a :b :c :d] :b) => [0 1 0 0]
raw docstring

one-hot-encodingclj

(one-hot-encoding dataset features)

Given a dataset and a list of categorical features, returns a new dataset with these features encoded into one-hot indicators E.g. (one-hot-encoding [{:a :left} {:a :right}] [:a]) => [{:a_left 1 :a_right 0} {:a_left 0 :a_right 1}]

Given a dataset and a list of categorical features, returns a new dataset with these
features encoded into one-hot indicators
E.g. (one-hot-encoding [{:a :left} {:a :right}] [:a])
       => [{:a_left 1 :a_right 0} {:a_left 0 :a_right 1}]
raw docstring

reverse-one-hotclj

(reverse-one-hot encoded-ds
                 features
                 &
                 {:keys [as-string?] :or {as-string? true}})

Given a one-hot-encoded dataset and a list of original features that were encoded, reverses the encoding and returns the dataset with the original features

If not :as-string?, values of the original feature are returned as keywords

Given a one-hot-encoded dataset and a list of original features that were encoded,
reverses the encoding and returns the dataset with the original features

If not :as-string?, values of the original feature are returned as keywords
raw docstring

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

× close