class_docstr: Learnable Models
class_docstr_tok: ["Learnable","Models"]
docstr: give prediction given Dataset
  
  Parameters
  ----------
  dataset : Dataset
      dataset will generate the processed dataset from model training.
  
  segment : Text or slice
      dataset will use this segment to prepare data. (default=test)
  
  Returns
  -------
  Prediction results with certain type such as `pandas.Series`.
docstr_tok: ["give","prediction","given","Dataset","Parameters","--","--","--","--","--","dataset",":","Dataset","dataset","will","generate","the","processed","dataset","from","model","training",".","segment",":","Text","or","slice","dataset","will","use","this","segment","to","prepare","data",".","(","default=test",")","Returns","--","--","--","-","Prediction","results","with","certain","type","such","as","`","pandas.Series","`","."]
code: def predict(
      self, dataset: Dataset, segment: Union[Text, slice] = "test"
  ) -> object:
      """give prediction given Dataset
  
      Parameters
      ----------
      dataset : Dataset
          dataset will generate the processed dataset from model training.
  
      segment : Text or slice
          dataset will use this segment to prepare data. (default=test)
  
      Returns
      -------
      Prediction results with certain type such as `pandas.Series`.
      """
      raise NotImplementedError()
  
file_path: qlib/qlib/model/base.py
imports: import abc
  from typing import Text, Union
  from ..utils.serial import Serializable
  from ..data.dataset import Dataset
  from ..data.dataset.weight import Reweighter
label_desc: Use image node_id 2 for calling the Model obj's underlying member method code with example usage: obj.predict(dataset, segment) without return types