class_docstr: Calculates values based on a least-squares regression.
  
  :param dataSeries: The DataSeries instance being filtered.
  :type dataSeries: :class:`pyalgotrade.dataseries.DataSeries`.
  :param windowSize: The number of values to use to calculate the regression.
  :type windowSize: int.
  :param maxLen: The maximum number of values to hold.
      Once a bounded length is full, when new items are added, a corresponding number of items are discarded from the
      opposite end. If None then dataseries.DEFAULT_MAX_LEN is used.
  :type maxLen: int.
class_docstr_tok: ["Calculates","values","based","on","a","least-squares","regression",".",":","param","dataSeries",":","The","DataSeries","instance","being","filtered",".",":","type","dataSeries",":",":","class",":","`","pyalgotrade.dataseries.DataSeries","`",".",":","param","windowSize",":","The","number","of","values","to","use","to","calculate","the","regression",".",":","type","windowSize",":","int",".",":","param","maxLen",":","The","maximum","number","of","values","to","hold",".","Once","a","bounded","length","is","full",",","when","new","items","are","added",",","a","corresponding","number","of","items","are","discarded","from","the","opposite","end",".","If","None","then","dataseries.DEFAULT_MAX_LEN","is","used",".",":","type","maxLen",":","int","."]
docstr: Calculates the value at a given time based on the regression line.
  
  :param dateTime: The datetime to calculate the value at.
      Will return None if there are not enough values in the underlying DataSeries.
  :type dateTime: :class:`datetime.datetime`.
docstr_tok: ["Calculates","the","value","at","a","given","time","based","on","the","regression","line",".",":","param","dateTime",":","The","datetime","to","calculate","the","value","at",".","Will","return","None","if","there","are","not","enough","values","in","the","underlying","DataSeries",".",":","type","dateTime",":",":","class",":","`","datetime.datetime","`","."]
code: def getValueAt(self, dateTime):
      """Calculates the value at a given time based on the regression line.
  
      :param dateTime: The datetime to calculate the value at.
          Will return None if there are not enough values in the underlying DataSeries.
      :type dateTime: :class:`datetime.datetime`.
      """
      return self.getEventWindow().getValueAt(dateTime)
  
imports: from pyalgotrade import technical
  from pyalgotrade.utils import collections
  from pyalgotrade.utils import dt
  import numpy
  from scipy import stats
label_desc: Use image node_id 2 for calling the LeastSquaresRegression obj's underlying member method code with example usage: obj.getValueAt(dateTime) and returns: self