org.apache.ignite.ml.regressions.logistic

## Class LogisticRegressionModel

- java.lang.Object
- - org.apache.ignite.ml.regressions.logistic.LogisticRegressionModel

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

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

  Logistic regression (logit model) is a generalized linear model used for binomial regression.
  See Also:
    Serialized Form

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `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<LogisticRegressionModel,P> exporter, P path)` Save model by the given path.
    `double` | `threshold()` Gets the threshold.
    `String` | `toString()`
    `String` | `toString(boolean pretty)`
    `Vector` | `weights()` Gets the weights.
    `LogisticRegressionModel` | `withIntercept(double intercept)` Set up the intercept.
    `LogisticRegressionModel` | `withRawLabels(boolean isKeepingRawLabels)` Set up the output label format.
    `LogisticRegressionModel` | `withThreshold(double threshold)` Set up the threshold.
    `LogisticRegressionModel` | `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

    - #### LogisticRegressionModel

          public LogisticRegressionModel(Vector weights,
                                         double intercept)

  - ### Method Detail

    - #### withRawLabels

          public LogisticRegressionModel withRawLabels(boolean isKeepingRawLabels)

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

    - #### withThreshold

          public LogisticRegressionModel withThreshold(double threshold)

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

    - #### withWeights

          public LogisticRegressionModel withWeights(Vector weights)

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

    - #### withIntercept

          public LogisticRegressionModel withIntercept(double intercept)

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

    - #### 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.

    - #### 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.

    - #### saveModel

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

      Save model by the given path.
      Specified by:
        `saveModel` in interface `Exportable<LogisticRegressionModel>`
      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.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020