class_docstr: XLearn is the core interface used by python API.
class_docstr_tok: ["XLearn","is","the","core","interface","used","by","python","API","."]
docstr: Predict output
  
  Parameters
  ----------
  model_path : str. path of model checkpoint.
  out_path : str, default None. if a path of output result is set, then will save result to local file,
  and will not return numpy res.
docstr_tok: ["Predict","output","Parameters","--","--","--","--","--","model_path",":","str",".","path","of","model","checkpoint",".","out_path",":","str",",","default","None",".","if","a","path","of","output","result","is","set",",","then","will","save","result","to","local","file",",","and","will","not","return","numpy","res","."]
code: def predict(self, model_path, out_path=None):
      """Predict output
  
      Parameters
      ----------
      model_path : str. path of model checkpoint.
      out_path : str, default None. if a path of output result is set, then will save result to local file,
      and will not return numpy res.
      """
      if out_path is None:
          length = ctypes.c_uint64()
          preds = ctypes.POINTER(ctypes.c_float)()
          _check_call(
              _LIB.XLearnPredictForMat(
                  ctypes.byref(self.handle),
                  c_str(model_path),
                  ctypes.byref(length),
                  ctypes.byref(preds),
              )
          )
          res = np.zeros(length.value, dtype=np.float32)
          ctypes.memmove(
              res.ctypes.data, preds, length.value * res.strides[0]
          )
          return res
      else:
          _check_call(
              _LIB.XLearnPredictForFile(
                  ctypes.byref(self.handle),
                  c_str(model_path),
                  c_str(out_path),
              )
          )
  
imports: import sys
  import os
  import ctypes
  from numpy import ndarray
  from .base import Series, DataFrame
  import numpy
  from .base import _LIB, XLearnHandle
  from .base import _check_call, c_str
  from .data import DMatrix
label_desc: Use image node_id 20 for calling the XLearn obj's underlying member method code with example usage: obj.predict(model_path, out_path) and returns: res