org.apache.ignite.ml.naivebayes.compound

## Class CompoundNaiveBayesModel

- java.lang.Object
- - org.apache.ignite.ml.naivebayes.compound.CompoundNaiveBayesModel

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

      public class CompoundNaiveBayesModel
      extends Object
      implements IgniteModel<Vector,Double>, Exportable<CompoundNaiveBayesModel>, DeployableObject

  A compound Naive Bayes model which uses a composition of`GaussianNaiveBayesModel` and `DiscreteNaiveBayesModel`.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompoundNaiveBayesModel()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<Object>` | `getDependencies()` Returns dependencies of this object that can be object with class defined by client side and unknown for server.
    `DiscreteNaiveBayesModel` | `getDiscreteModel()` Returns a discrete model.
    `GaussianNaiveBayesModel` | `getGaussianModel()` Returns a gaussian model.
    `Double` | `predict(Vector vector)` Make a prediction for the specified input arguments.
    `<P> void` | `saveModel(Exporter<CompoundNaiveBayesModel,P> exporter, P path)` Save model by the given path.
    `CompoundNaiveBayesModel` | `withDiscreteFeatureIdsToSkip(Collection<Integer> discreteFeatureIdsToSkip)` Sets feature ids to skip in discrete Bayes.
    `CompoundNaiveBayesModel` | `withDiscreteModel(DiscreteNaiveBayesModel discreteModel)` Sets a discrete model.
    `CompoundNaiveBayesModel` | `withGaussianFeatureIdsToSkip(Collection<Integer> gaussianFeatureIdsToSkip)` Sets feature ids to skip in Gaussian Bayes.
    `CompoundNaiveBayesModel` | `withGaussianModel(GaussianNaiveBayesModel gaussianModel)` Sets a gaussian model.
    `CompoundNaiveBayesModel` | `withLabels(double[] labels)` Sets labels.
    `CompoundNaiveBayesModel` | `withPriorProbabilities(double[] priorProbabilities)` Sets prior probabilities.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

      `andBefore, andThen, andThen, close, combine, toString`

- - ### Constructor Detail

    - #### CompoundNaiveBayesModel

          public CompoundNaiveBayesModel()

  - ### Method Detail

    - #### saveModel

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

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

    - #### predict

          public Double predict(Vector vector)

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

    - #### getGaussianModel

          public GaussianNaiveBayesModel getGaussianModel()

      Returns a gaussian model.

    - #### getDiscreteModel

          public DiscreteNaiveBayesModel getDiscreteModel()

      Returns a discrete model.

    - #### withPriorProbabilities

          public CompoundNaiveBayesModel withPriorProbabilities(double[] priorProbabilities)

      Sets prior probabilities.

    - #### withLabels

          public CompoundNaiveBayesModel withLabels(double[] labels)

      Sets labels.

    - #### withGaussianModel

          public CompoundNaiveBayesModel withGaussianModel(GaussianNaiveBayesModel gaussianModel)

      Sets a gaussian model.

    - #### withDiscreteModel

          public CompoundNaiveBayesModel withDiscreteModel(DiscreteNaiveBayesModel discreteModel)

      Sets a discrete model.

    - #### withGaussianFeatureIdsToSkip

          public CompoundNaiveBayesModel withGaussianFeatureIdsToSkip(Collection<Integer> gaussianFeatureIdsToSkip)

      Sets feature ids to skip in Gaussian Bayes.

    - #### withDiscreteFeatureIdsToSkip

          public CompoundNaiveBayesModel withDiscreteFeatureIdsToSkip(Collection<Integer> discreteFeatureIdsToSkip)

      Sets feature ids to skip in discrete Bayes.

    - #### getDependencies

          public List<Object> getDependencies()

      Returns dependencies of this object that can be object with class defined by client side and unknown for server.
      Specified by:
        `getDependencies` in interface `DeployableObject`

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020