Class FMRegressionModel

All Implemented Interfaces:<ModelProvenance>, Serializable, ONNXExportable

public class FMRegressionModel extends AbstractFMModel<Regressor> implements ONNXExportable
The inference time model of a regression factorization machine trained using SGD. Independently predicts each output dimension, unless they are tied together in the optimiser.


 Rendle, S.
 Factorization machines.
 2010 IEEE International Conference on Data Mining
See Also:
  • Method Details

    • predict

      public Prediction<Regressor> predict(Example<Regressor> example)
      Description copied from class: Model
      Uses the model to predict the output for a single example.

      predict does not mutate the example.

      Throws IllegalArgumentException if the example has no features or no feature overlap with the model.

      Specified by:
      predict in class Model<Regressor>
      example - the example to predict.
      the result of the prediction.
    • copy

      protected FMRegressionModel copy(String newName, ModelProvenance newProvenance)
      Description copied from class: Model
      Copies a model, replacing its provenance and name with the supplied values.

      Used to provide the provenance removal functionality.

      Specified by:
      copy in class Model<Regressor>
      newName - The new name.
      newProvenance - The new provenance.
      A copy of the model.
    • getDimensionName

      protected String getDimensionName(int index)
      Description copied from class: AbstractFMModel
      Gets the name of the indexed output dimension.
      Specified by:
      getDimensionName in class AbstractFMModel<Regressor>
      index - The output dimension index.
      The name of the requested output dimension.
    • onnxModelName

      protected String onnxModelName()
      Specified by:
      onnxModelName in class AbstractFMModel<Regressor>
      Name to write into the ONNX Model.
    • onnxOutput

      protected ONNXNode onnxOutput(ONNXNode fmOutput)
      Description copied from class: AbstractFMModel
      Takes the unnormalized ONNX output of this model and applies an appropriate normalizer from the concrete class.
      Specified by:
      onnxOutput in class AbstractFMModel<Regressor>
      fmOutput - Unnormalized ONNX leaf node.
      Normalized ONNX leaf node.