org.apache.ignite.ml.svm

## Class SVMLinearClassificationModel

- java.lang.Object
- - org.apache.ignite.ml.svm.SVMLinearClassificationModel

- All Implemented Interfaces:
    Serializable, AutoCloseable, Exportable<SVMLinearClassificationModel>, IgniteModel<Vector,Double>, JSONWritable, Model<Vector,Double>

      public final class SVMLinearClassificationModel
      extends Object
      implements IgniteModel<Vector,Double>, Exportable<SVMLinearClassificationModel>, JSONWritable

  Base class for SVM linear classification model.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SVMLinearClassificationModel.SVMLinearClassificationJSONExportModel`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SVMLinearClassificationModel()`
    `SVMLinearClassificationModel(Vector weights, double intercept)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `static SVMLinearClassificationModel` | `fromJSON(Path path)` Loads SVMLinearClassificationModel from JSON file.
    `int` | `hashCode()`
    `double` | `intercept()` Gets the intercept.
    `boolean` | `isKeepingRawLabels()` Gets the output label format mode.
    `Double` | `predict(Vector input)` Make a prediction for the specified input arguments.
    `<P> void` | `saveModel(Exporter<SVMLinearClassificationModel,P> exporter, P path)` Save model by the given path.
    `double` | `threshold()` Gets the threshold.
    `void` | `toJSON(Path path)`
    `String` | `toString()`
    `String` | `toString(boolean pretty)`
    `Vector` | `weights()` Gets the weights.
    `SVMLinearClassificationModel` | `withIntercept(double intercept)` Set up the intercept.
    `SVMLinearClassificationModel` | `withRawLabels(boolean isKeepingRawLabels)` Set up the output label format.
    `SVMLinearClassificationModel` | `withThreshold(double threshold)` Set up the threshold.
    `SVMLinearClassificationModel` | `withWeights(Vector weights)` Set up the weights.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.ignite.ml.IgniteModel

      `andBefore, andThen, andThen, close, combine`

- - ### Constructor Detail

    - #### SVMLinearClassificationModel

          public SVMLinearClassificationModel()

    - #### SVMLinearClassificationModel

          public SVMLinearClassificationModel(Vector weights,
                                              double intercept)

  - ### Method Detail

    - #### withRawLabels

          public SVMLinearClassificationModel withRawLabels(boolean isKeepingRawLabels)

      Set up the output label format.
      Parameters:
        `isKeepingRawLabels` - The parameter value.
      Returns:
        Model with new isKeepingRawLabels parameter value.

    - #### withThreshold

          public SVMLinearClassificationModel withThreshold(double threshold)

      Set up the threshold.
      Parameters:
        `threshold` - The parameter value.
      Returns:
        Model with new threshold parameter value.

    - #### withWeights

          public SVMLinearClassificationModel withWeights(Vector weights)

      Set up the weights.
      Parameters:
        `weights` - The parameter value.
      Returns:
        Model with new weights parameter value.

    - #### withIntercept

          public SVMLinearClassificationModel withIntercept(double intercept)

      Set up the intercept.
      Parameters:
        `intercept` - The parameter value.
      Returns:
        Model with new intercept parameter value.

    - #### predict

          public Double predict(Vector input)

      Make a prediction for the specified input arguments.
      Specified by:
        `predict` in interface `Model<Vector,Double>`
      Parameters:
        `input` - Input arguments.
      Returns:
        Prediction result.

    - #### isKeepingRawLabels

          public boolean isKeepingRawLabels()

      Gets the output label format mode.
      Returns:
        The parameter value.

    - #### threshold

          public double threshold()

      Gets the threshold.
      Returns:
        The parameter value.

    - #### weights

          public Vector weights()

      Gets the weights.
      Returns:
        The parameter value.

    - #### intercept

          public double intercept()

      Gets the intercept.
      Returns:
        The parameter value.

    - #### saveModel

          public <P> void saveModel(Exporter<SVMLinearClassificationModel,P> exporter,
                                    P path)

      Save model by the given path.
      Specified by:
        `saveModel` in interface `Exportable<SVMLinearClassificationModel>`
      Parameters:
        `exporter` - Exporter.
        `path` - Path to saved model.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toString

          public String toString(boolean pretty)

      Specified by:
        `toString` in interface `IgniteModel<Vector,Double>`
      Parameters:
        `pretty` - Use pretty mode.

    - #### fromJSON

          public static SVMLinearClassificationModel fromJSON(Path path)

      Loads SVMLinearClassificationModel from JSON file.

    - #### toJSON

          public void toJSON(Path path)

      Specified by:
        `toJSON` in interface `JSONWritable`

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023