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","."]
docstr: Split a time series into approximately equal intervals.
  
  Adopted from = https://stackoverflow.com/questions/2130016/
                 splitting-a-list-into-n-parts-of-approximately
                 -equal-length
  
  Parameters
  ----------
  X : a numpy array of shape = [time_series_length]
  
  Returns
  -------
  output : a numpy array of shape = [num_intervals,interval_size]
docstr_tok: ["Split","a","time","series","into","approximately","equal","intervals",".","Adopted","from","=","https",":","\/\/stackoverflow.com\/questions\/2130016\/","splitting-a-list-into-n-parts-of-approximately","-equal-length","Parameters","--","--","--","--","--","X",":","a","numpy","array","of","shape","=","[","time_series_length","]","Returns","--","--","--","-","output",":","a","numpy","array","of","shape","=","[","num_intervals",",","interval_size","]"]
code: def _split_time_series(self, X):
      """Split a time series into approximately equal intervals.
  
      Adopted from = https://stackoverflow.com/questions/2130016/
                     splitting-a-list-into-n-parts-of-approximately
                     -equal-length
  
      Parameters
      ----------
      X : a numpy array of shape = [time_series_length]
  
      Returns
      -------
      output : a numpy array of shape = [num_intervals,interval_size]
      """
      avg = len(X) / float(self.num_intervals)
      output = []
      beginning = 0.0
  
      while beginning < len(X):
          output.append(X[int(beginning) : int(beginning + avg)])
          beginning += avg
  
      return output
  
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 5 for calling the SlopeTransformer obj's underlying member method code with example usage: obj._split_time_series(X) and returns: output