class_docstr: This scaling object represents the following scaling equations for inputs (x)
  and outputs (y)
  
  .. math::
      \begin{align*}
      x_i^{scaled} = \frac{(x_i-x_i^{offset})}{x_i^{factor}} \\
      y_i^{scaled} = \frac{(y_i-y_i^{offset})}{y_i^{factor}}
      \end{align*}
  
  Parameters
  ----------
  offset_inputs : array-like
      Array of the values of the offsets for each input to the network
  factor_inputs : array-like
      Array of the scaling factors (division) for each input to the network
  offset_outputs : array-like
      Array of the values of the offsets for each output from the network
  factor_outputs : array-like
      Array of the scaling factors (division) for each output from the network
class_docstr_tok: ["This","scaling","object","represents","the","following","scaling","equations","for","inputs","(","x",")","and","outputs","(","y",")","..","math",":",":","\\begin","{","align","*","}","x_i^","{","scaled","}","=","\\frac","{","(","x_i-x_i^","{","offset","}",")","}","{","x_i^","{","factor","}","}","\\\\","y_i^","{","scaled","}","=","\\frac","{","(","y_i-y_i^","{","offset","}",")","}","{","y_i^","{","factor","}","}","\\end","{","align","*","}","Parameters","--","--","--","--","--","offset_inputs",":","array-like","Array","of","the","values","of","the","offsets","for","each","input","to","the","network","factor_inputs",":","array-like","Array","of","the","scaling","factors","(","division",")","for","each","input","to","the","network","offset_outputs",":","array-like","Array","of","the","values","of","the","offsets","for","each","output","from","the","network","factor_outputs",":","array-like","Array","of","the","scaling","factors","(","division",")","for","each","output","from","the","network"]
code: def __init__(
      self, offset_inputs, factor_inputs, offset_outputs, factor_outputs
  ):
      super(OffsetScaling, self).__init__()
      self.__x_offset = convert_to_dict(offset_inputs)
      self.__x_factor = convert_to_dict(factor_inputs)
      self.__y_offset = convert_to_dict(offset_outputs)
      self.__y_factor = convert_to_dict(factor_outputs)
  
      for k, v in self.__x_factor.items():
          if v <= 0:
              raise ValueError(
                  "OffsetScaling only accepts positive values"
                  " for factor_inputs. Negative value found at"
                  " index {}.".format(k)
              )
      for k, v in self.__y_factor.items():
          if v <= 0:
              raise ValueError(
                  "OffsetScaling only accepts positive values"
                  " for factor_outputs. Negative value found at"
                  " index {}.".format(k)
              )
  
file_path: OMLT/src/omlt/scaling.py
imports: import abc
label_desc: Use image node_id 1 to create a new OffsetScaling object from inherited base classes: ScalingInterface with example: obj = OffsetScaling(offset_inputs, factor_inputs, offset_outputs, factor_outputs)