class_docstr: Takes a data set with a categorical target variable encoded as a time series and transforms it
  with run length encoding (RLE) of the target variable
  
  RLE finds contiguous runs of the same target value within the input data and derives the
  transformed data set from the amalgum of all contiguous runs of all target classes from all
  series in the input data.
  
  This is useful for generating "pure" series with no mixing of target variables from datasets
  that encode the target variable as a series (e.g. MHEALTH and PAMAP2)
  
  Note that ``seglearn`` can handle datasets with target variables encoded as a series natively
  (using ``SegmentXY``) and so this preprocessing is not required but may be helpful for some tasks.
  Effectively it will let you use ``SegmentX`` on datasets that would otherwise require ``SegmentXY``.
  
  Parameters
  ----------
  min_length : integer > 1
      minimum number of samples in a run for it to be included in the transformed data
class_docstr_tok: ["Takes","a","data","set","with","a","categorical","target","variable","encoded","as","a","time","series","and","transforms","it","with","run","length","encoding","(","RLE",")","of","the","target","variable","RLE","finds","contiguous","runs","of","the","same","target","value","within","the","input","data","and","derives","the","transformed","data","set","from","the","amalgum","of","all","contiguous","runs","of","all","target","classes","from","all","series","in","the","input","data",".","This","is","useful","for","generating","``","pure","''","series","with","no","mixing","of","target","variables","from","datasets","that","encode","the","target","variable","as","a","series","(","e.g",".","MHEALTH","and","PAMAP2",")","Note","that","``","seglearn","``","can","handle","datasets","with","target","variables","encoded","as","a","series","natively","(","using","``","SegmentXY","``",")","and","so","this","preprocessing","is","not","required","but","may","be","helpful","for","some","tasks",".","Effectively","it","will","let","you","use","``","SegmentX","``","on","datasets","that","would","otherwise","require","``","SegmentXY","``",".","Parameters","--","--","--","--","--","min_length",":","integer",">","1","minimum","number","of","samples","in","a","run","for","it","to","be","included","in","the","transformed","data"]
code: def __init__(self, min_length=200):
      self.min_length = min_length
      self._validate_params()
  
file_path: seglearn/seglearn/preprocessing.py
imports: import numpy
  from sklearn.base import BaseEstimator
  from .base import TS_Data
  from .util import get_ts_data_parts, check_ts_data_with_ts_target
  from .transform import XyTransformerMixin, expand_variables_to_segments
label_desc: Use image node_id 1 to create a new TargetRunLengthEncoder object from inherited base classes: BaseEstimator, XyTransformerMixin with example: obj = TargetRunLengthEncoder(min_length)