timeflux.nodes.ml


Machine Learning

ml

timeflux.nodes.ml.IDLE = 0
timeflux.nodes.ml.ACCUMULATING = 1
timeflux.nodes.ml.FITTING = 2
timeflux.nodes.ml.READY = 3
class timeflux.nodes.ml.Pipeline(steps, fit=True, mode='predict', meta_label='epoch', 'context', 'target', event_start_accumulation='accumulation_starts', event_stop_accumulation='accumulation_stops', event_start_training='training_starts', buffer_size='5s', passthrough=False, resample=False, resample_direction='right', resample_rate=None, model=None, cv=None)[source]

Bases: timeflux.core.node.Node

Fit, transform and predict.

Training on continuous data is always unsupervised. Training on epoched data can either be supervised or unsupervised.

If fit is False, input events are ignored, and not initital training is performed. Automatically set to False if mode is either ‘fit_predict’ or fit_transform’. Automatically set to True if mode is either ‘predict’, ‘predict_proba’ or ‘predict_log_proba’.

Variables
  • i (Port) – Continuous data input, expects DataFrame.

  • i_* (Port) – Epoched data input, expects DataFrame.

  • i_training (Port) – Continuous training data input, expects DataFrame.

  • i_training_* (Port) – Epoched training data input, expects DataFrame.

  • i_events (Port) – Event input, expects DataFrame.

  • o (Port) – Continuous data output, provides DataFrame.

  • o_* (Port) – Epoched data output, provides DataFrame.

  • o_events (Port) – Event output, provides DataFrame.

Parameters
  • steps (dict) – Pipeline steps and settings

  • fit (bool) –

  • mode ('predict'|'predict_proba'|'predict_log_proba'|'transform'|'fit_predict'|'fit_transform') –

  • meta_label (str|tuple|None) –

  • event_start_accumulation (str) –

  • event_stop_accumulation (str) –

  • event_start_training (str) –

  • buffer_size (str) –

  • passthrough (bool) –

  • resample (bool) –

  • resample_direction ('right'|'left'|'both') –

  • resample_rate (None|float) –

  • model – Load a pickle model - NOT IMPLEMENTED

  • cv – Cross-validation - NOT IMPLEMENTED

Create instance and initialize the logger.

update(self)[source]
terminate(self)[source]