class_docstr: Build a Curve Model to predict the performance
  
  Algorithm: https://github.com/Microsoft/nni/blob/master/src/sdk/pynni/nni/curvefitting_assessor/README.md
  
  Parameters
  ----------
  target_pos : int
      The point we need to predict
class_docstr_tok: ["Build","a","Curve","Model","to","predict","the","performance","Algorithm",":","https",":","\/\/github.com\/Microsoft\/nni\/blob\/master\/src\/sdk\/pynni\/nni\/curvefitting_assessor\/README.md","Parameters","--","--","--","--","--","target_pos",":","int","The","point","we","need","to","predict"]
docstr: return the predict y of 'model' when epoch = pos
  
  Parameters
  ----------
  model : string
      name of the curve function model
  pos : int
      the epoch number of the position you want to predict
  
  Returns
  -------
  int
      The expected matrix at pos
docstr_tok: ["return","the","predict","y","of","'model","'","when","epoch","=","pos","Parameters","--","--","--","--","--","model",":","string","name","of","the","curve","function","model","pos",":","int","the","epoch","number","of","the","position","you","want","to","predict","Returns","--","--","--","-","int","The","expected","matrix","at","pos"]
code: def predict_y(self, model, pos):
      """return the predict y of 'model' when epoch = pos
  
      Parameters
      ----------
      model : string
          name of the curve function model
      pos : int
          the epoch number of the position you want to predict
  
      Returns
      -------
      int
          The expected matrix at pos
      """
      if model_para_num[model] == 2:
          y = all_models[model](
              pos, model_para[model][0], model_para[model][1]
          )
      elif model_para_num[model] == 3:
          y = all_models[model](
              pos,
              model_para[model][0],
              model_para[model][1],
              model_para[model][2],
          )
      elif model_para_num[model] == 4:
          y = all_models[model](
              pos,
              model_para[model][0],
              model_para[model][1],
              model_para[model][2],
              model_para[model][3],
          )
      return y
  
file_path: nni/nni/algorithms/hpo/curvefitting_assessor/model_factory.py
imports: import logging
  import numpy
  from scipy import optimize
  from .curvefunctions import *
label_desc: Use image node_id 4 for calling the CurveModel obj's underlying member method code with example usage: obj.predict_y(model, pos) and returns: y