class_docstr: Slope-by-segment transformation.
  
  Class to perform the Slope transformation on a time series
  dataframe. It splits a time series into num_intervals segments.
  Then within each segment, it performs a total least
  squares regression to extract the gradient of the segment.
  
  Parameters
  ----------
  num_intervals : int, number of approx equal segments
                  to split the time series into.
class_docstr_tok: ["Slope-by-segment","transformation",".","Class","to","perform","the","Slope","transformation","on","a","time","series","dataframe",".","It","splits","a","time","series","into","num_intervals","segments",".","Then","within","each","segment",",","it","performs","a","total","least","squares","regression","to","extract","the","gradient","of","the","segment",".","Parameters","--","--","--","--","--","num_intervals",":","int",",","number","of","approx","equal","segments","to","split","the","time","series","into","."]
code: def __init__(self, num_intervals=8):
      self.num_intervals = num_intervals
      super().__init__()
  
file_path: sktime/sktime/transformations/panel/slope.py
imports: import math
  import statistics
  import numpy
  import pandas
  from sktime.datatypes import convert
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 1 to create a new SlopeTransformer object from inherited base classes: BaseTransformer with example: obj = SlopeTransformer(num_intervals)