Class BayesPointMachineClassifierPredictionSettings<TLabel>
Abstract prediction settings of a Bayes point machine classifier.
Inheritance
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Learners
Assembly: Microsoft.ML.Probabilistic.Learners.Classifier.dll
Syntax
[Serializable]
public abstract class BayesPointMachineClassifierPredictionSettings<TLabel> : IBayesPointMachineClassifierPredictionSettings<TLabel>, ICustomSerializable
Type Parameters
| Name | Description |
|---|---|
| TLabel | The type of a label. |
Remarks
These settings can be modified after training.
Constructors
BayesPointMachineClassifierPredictionSettings()
Initializes a new instance of the BayesPointMachineClassifierPredictionSettings<TLabel> class.
Declaration
protected BayesPointMachineClassifierPredictionSettings()
BayesPointMachineClassifierPredictionSettings(IReader)
Initializes a new instance of the BayesPointMachineClassifierPredictionSettings<TLabel> class from a reader of a binary stream.
Declaration
protected BayesPointMachineClassifierPredictionSettings(IReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| IReader | reader | The binary reader to read the prediction settings from. |
Fields
LossFunctionDefault
The default loss function.
Declaration
public const LossFunction LossFunctionDefault = LossFunction.ZeroOne
Field Value
| Type | Description |
|---|---|
| LossFunction |
Methods
GetPredictionLossFunction(out Func<TLabel, TLabel, Double>)
Gets the loss function which determines how a prediction in the form of a distribution is converted into a point prediction.
Declaration
public LossFunction GetPredictionLossFunction(out Func<TLabel, TLabel, double> customLossFunction)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<TLabel, TLabel, Double> | customLossFunction | The custom loss function. This is |
Returns
| Type | Description |
|---|---|
| LossFunction | The LossFunction. |
Remarks
A loss function returns the loss incurred when choosing an estimate instead of the true value, where the first argument is the true value and the second argument is the estimate of the true value.
SaveForwardCompatible(IWriter)
Saves the prediction settings of the Bayes point machine classifier using the specified writer to a binary stream.
Declaration
public virtual void SaveForwardCompatible(IWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| IWriter | writer | The writer to save the prediction settings to. |
SetPredictionLossFunction(LossFunction, Func<TLabel, TLabel, Double>)
Sets the loss function which determines how a prediction in the form of a distribution is converted into a point prediction.
Declaration
public void SetPredictionLossFunction(LossFunction lossFunction, Func<TLabel, TLabel, double> customLossFunction = null)
Parameters
| Type | Name | Description |
|---|---|---|
| LossFunction | lossFunction | The loss function. |
| Func<TLabel, TLabel, Double> | customLossFunction | An optional custom loss function. This can only be set when |