# `Clustream_with_kmeans`

### *class* capymoa.cluster.Clustream_with_kmeans[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/cluster/_clustream_with_kmeans.py#L10)

Bases: [`MOAClusterer`](capymoa.base.MOAClusterer.md#capymoa.base.MOAClusterer)

Clustream clustering algorithm without Macro-clustering.

#### \_\_init_\_(schema: [Schema](capymoa.stream.Schema.md#capymoa.stream.Schema) | [None](https://docs.python.org/3/builtins/constants.html#None) = None, time_window: [int](https://docs.python.org/3/builtins/functions.html#int) = 1000, max_num_kernels: [int](https://docs.python.org/3/builtins/functions.html#int) = 100, kernel_radi_factor: [float](https://docs.python.org/3/builtins/functions.html#float) = 2, k_option: [int](https://docs.python.org/3/builtins/functions.html#int) = 5)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/cluster/_clustream_with_kmeans.py#L15)

Clustream clusterer with K-means offline clustering.

* **Parameters:**
  * **schema** – The schema of the stream.
  * **time_window** – The size of the time window.
  * **max_num_kernels** – Maximum number of micro kernels to use.
  * **kernel_radi_factor** – Multiplier for the kernel radius
  * **k_option** – Number of clusters to use in the k-means offline step

#### cli_help()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/base/_base.py#L258)

#### *classmethod* from_params(schema: [Any](https://docs.python.org/3/library/typing.html#typing.Any) = None, params: [dict](https://docs.python.org/3/builtins/stdtypes.html#dict)[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [Any](https://docs.python.org/3/library/typing.html#typing.Any)] | [None](https://docs.python.org/3/builtins/constants.html#None) = None, random_seed: [int](https://docs.python.org/3/builtins/functions.html#int) = 1) → [Any](https://docs.python.org/3/library/typing.html#typing.Any)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/base/_learner_params.py#L170)

Construct an instance from parameters produced by `get_params`.

#### get_clustering_result()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/base/_base.py#L308)

#### get_micro_clustering_result()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/base/_base.py#L320)

#### get_params() → [dict](https://docs.python.org/3/builtins/stdtypes.html#dict)[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [Any](https://docs.python.org/3/library/typing.html#typing.Any)][[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/base/_learner_params.py#L163)

Return the hyper-parameters captured from the constructor.

#### implements_macro_clusters() → [bool](https://docs.python.org/3/builtins/functions.html#bool)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/cluster/_clustream_with_kmeans.py#L46)

#### implements_micro_clusters() → [bool](https://docs.python.org/3/builtins/functions.html#bool)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/cluster/_clustream_with_kmeans.py#L43)

#### train(instance)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/base/_base.py#L261)
