predict#

swordfish.function.predict()#

Make a prediction with the specified prediction model and data. The result is a vector with the same number of elements as the the number of rows in X. Each element of the vector corresponds to the predicted value of a row in X.

Parameters:
  • model (Constant) – A dictionary of the specifications of a prediction model. It is generated by functions such as randomForestClassifier or randomForestRegressor.

  • X (Constant) – A table. The column names must be the same as the column names in the table used to train the prediction model.