Liking cljdoc? Tell your friends :D

scicloj.ml.smile.clustering


clusterclj

(cluster clustering-method clustering-method-args target-column)

Metamorph transformer, which clusters the data and creates a new column with the cluster id.

clustering-method can be any of:

  • :spectral
  • :dbscan
  • :k-means
  • :mec
  • :clarans
  • :g-means
  • :lloyd
  • :x-means
  • :deterministic-annealing
  • :denclue

The clustering-args is a vector with the positional arguments for each cluster function, as documented here: https://cljdoc.org/d/generateme/fastmath/2.1.5/api/fastmath.clustering (but minus the data argument, which will be passed in automatically)

The cluster id of each row gets written to the column in target-column

metamorph.
Behaviour in mode :fitCalculates cluster centers of the rows dataset at key :metamorph/data and stores them in ctx under key at :metamorph/id. Adds as wll column in target-column with cluster centers into the dataset.
Behaviour in mode :transformReads cluster centers from ctx and applies it to data in :metamorph/data
Reads keys from ctxIn mode :transform : Reads cluster centers to use from ctx at key in :metamorph/id.
Writes keys to ctxIn mode :fit : Stores cluster centers in ctx under key in :metamorph/id.
Metamorph transformer, which clusters the data and creates a new column with the cluster id.

  `clustering-method` can be any of:

* :spectral
* :dbscan
* :k-means
* :mec
* :clarans
* :g-means
* :lloyd
* :x-means
* :deterministic-annealing
* :denclue

The `clustering-args` is a vector with the positional arguments for each cluster function,
as documented here:
https://cljdoc.org/d/generateme/fastmath/2.1.5/api/fastmath.clustering
(but minus the `data` argument, which will be passed in automatically)

The cluster id of each row gets written to the column in `target-column`

  metamorph                    | .
  -----------------------------|----------------------------------------------------------------------------
  Behaviour in mode :fit       | Calculates cluster centers of the rows dataset at key `:metamorph/data` and stores them in ctx under key at `:metamorph/id`. Adds as wll column in `target-column` with cluster centers into the dataset.
  Behaviour in mode :transform | Reads cluster centers from ctx and applies it to data in `:metamorph/data`
  Reads keys from ctx          | In mode `:transform` : Reads cluster centers to use from ctx at key in `:metamorph/id`.
  Writes keys to ctx           | In mode `:fit` : Stores cluster centers in ctx under key in `:metamorph/id`.

  
sourceraw docstring

fit-clusterclj

(fit-cluster data clustering-method clustering-method-args)
source

model-keywordsclj

source

train-fnclj

(train-fn feature-ds label-ds options)
source

train-fn-methodclj

(train-fn-method clustering-method feature-ds label-ds options)
source

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

× close