public class GaussianNaiveBayesTrainer extends SingleLabelDatasetTrainer<GaussianNaiveBayesModel>
setPriorProbabilities
or withEquiprobableClasses
. If equiprobableClasses
is set, the probabilities of all classes will be 1/k
, where k
is classes count.DatasetTrainer.EmptyDatasetException
envBuilder, environment
Constructor and Description |
---|
GaussianNaiveBayesTrainer() |
Modifier and Type | Method and Description |
---|---|
<K,V> GaussianNaiveBayesModel |
fitWithInitializedDeployingContext(DatasetBuilder<K,V> datasetBuilder,
Preprocessor<K,V> extractor)
Trains model based on the specified data.
|
boolean |
isUpdateable(GaussianNaiveBayesModel mdl) |
GaussianNaiveBayesTrainer |
resetSettings()
Sets default settings.
|
GaussianNaiveBayesTrainer |
setPriorProbabilities(double[] priorProbabilities)
Sets prior probabilities.
|
protected <K,V> GaussianNaiveBayesModel |
updateModel(GaussianNaiveBayesModel mdl,
DatasetBuilder<K,V> datasetBuilder,
Preprocessor<K,V> extractor)
Trains new model taken previous one as a first approximation.
|
GaussianNaiveBayesTrainer |
withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)
Changes learning Environment.
|
GaussianNaiveBayesTrainer |
withEquiprobableClasses()
Sets equal probability for all classes.
|
fit, fit, fit, fit, fit, fit, getLastTrainedModelOrThrowEmptyDatasetException, identityTrainer, learningEnvironment, update, update, update, update, update, withConvertedLabels
public <K,V> GaussianNaiveBayesModel fitWithInitializedDeployingContext(DatasetBuilder<K,V> datasetBuilder, Preprocessor<K,V> extractor)
fitWithInitializedDeployingContext
in class DatasetTrainer<GaussianNaiveBayesModel,Double>
K
- Type of a key in upstream
data.V
- Type of a value in upstream
data.datasetBuilder
- Dataset builder.extractor
- Extractor of UpstreamEntry
into LabeledVector
.public boolean isUpdateable(GaussianNaiveBayesModel mdl)
isUpdateable
in class DatasetTrainer<GaussianNaiveBayesModel,Double>
mdl
- Model.public GaussianNaiveBayesTrainer withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)
withEnvironmentBuilder
in class DatasetTrainer<GaussianNaiveBayesModel,Double>
envBuilder
- Learning environment builder.protected <K,V> GaussianNaiveBayesModel updateModel(GaussianNaiveBayesModel mdl, DatasetBuilder<K,V> datasetBuilder, Preprocessor<K,V> extractor)
updateModel
in class DatasetTrainer<GaussianNaiveBayesModel,Double>
K
- Type of a key in upstream
data.V
- Type of a value in upstream
data.mdl
- Learned model.datasetBuilder
- Dataset builder.extractor
- Extractor of UpstreamEntry
into LabeledVector
.public GaussianNaiveBayesTrainer withEquiprobableClasses()
public GaussianNaiveBayesTrainer setPriorProbabilities(double[] priorProbabilities)
public GaussianNaiveBayesTrainer resetSettings()
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024