diff --git a/src/Microsoft.ML.Core/Prediction/IPredictor.cs b/src/Microsoft.ML.Core/Prediction/IPredictor.cs
index 75d7f48dc2..7eac875984 100644
--- a/src/Microsoft.ML.Core/Prediction/IPredictor.cs
+++ b/src/Microsoft.ML.Core/Prediction/IPredictor.cs
@@ -2,62 +2,61 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-namespace Microsoft.ML
+namespace Microsoft.ML;
+
+///
+/// Type of prediction task. Note that this is a legacy structure and usage of this should generally be
+/// discouraged in future projects. Its presence suggests that there are privileged and supported
+/// tasks, and anything outside of this is unsupported. This runs rather contrary to the idea of this
+/// being an expandable framework, and it is inappropriately limiting. For legacy pipelines based on
+/// and it is still useful, but for things based on
+/// the idiom, it is inappropriate.
+///
+[BestFriend]
+internal enum PredictionKind
{
- ///
- /// Type of prediction task. Note that this is a legacy structure and usage of this should generally be
- /// discouraged in future projects. Its presence suggests that there are privileged and supported
- /// tasks, and anything outside of this is unsupported. This runs rather contrary to the idea of this
- /// being an expandable framework, and it is inappropriately limiting. For legacy pipelines based on
- /// and it is still useful, but for things based on
- /// the idiom, it is inappropriate.
- ///
- [BestFriend]
- internal enum PredictionKind
- {
- Unknown = 0,
- Custom = 1,
+ Unknown = 0,
+ Custom = 1,
- BinaryClassification = 2,
- MulticlassClassification = 3,
- Regression = 4,
- MultiOutputRegression = 5,
- Ranking = 6,
- Recommendation = 7,
- AnomalyDetection = 8,
- Clustering = 9,
- SequenceClassification = 10,
+ BinaryClassification = 2,
+ MulticlassClassification = 3,
+ Regression = 4,
+ MultiOutputRegression = 5,
+ Ranking = 6,
+ Recommendation = 7,
+ AnomalyDetection = 8,
+ Clustering = 9,
+ SequenceClassification = 10,
- // More to be added later.
- }
+ // More to be added later.
+}
+///
+/// Weakly typed version of IPredictor.
+///
+[BestFriend]
+internal interface IPredictor
+{
///
- /// Weakly typed version of IPredictor.
+ /// Return the type of prediction task.
///
- [BestFriend]
- internal interface IPredictor
- {
- ///
- /// Return the type of prediction task.
- ///
- PredictionKind PredictionKind { get; }
- }
+ PredictionKind PredictionKind { get; }
+}
- ///
- /// A predictor the produces values of the indicated type.
- /// REVIEW: Determine whether this is just a temporary shim or long term solution.
- ///
- [BestFriend]
- internal interface IPredictorProducing : IPredictor
- {
- }
+///
+/// A predictor the produces values of the indicated type.
+/// REVIEW: Determine whether this is just a temporary shim or long term solution.
+///
+[BestFriend]
+internal interface IPredictorProducing : IPredictor
+{
+}
- ///
- /// A predictor that produces values and distributions of the indicated types.
- /// Note that from a public API perspective this is bad.
- ///
- [BestFriend]
- internal interface IDistPredictorProducing : IPredictorProducing
- {
- }
+///
+/// A predictor that produces values and distributions of the indicated types.
+/// Note that from a public API perspective this is bad.
+///
+[BestFriend]
+internal interface IDistPredictorProducing : IPredictorProducing
+{
}
diff --git a/src/Microsoft.ML.Core/Prediction/ITrainer.cs b/src/Microsoft.ML.Core/Prediction/ITrainer.cs
index a6622a5269..5b3ca9b0ca 100644
--- a/src/Microsoft.ML.Core/Prediction/ITrainer.cs
+++ b/src/Microsoft.ML.Core/Prediction/ITrainer.cs
@@ -4,104 +4,103 @@
using Microsoft.ML.Data;
-namespace Microsoft.ML
-{
- // REVIEW: Would be nice if the registration under SignatureTrainer were automatic
- // given registration for one of the "sub-class" signatures.
+namespace Microsoft.ML;
- ///
- /// Loadable class signatures for trainers. Typically each trainer should register with
- /// both SignatureTrainer and SignatureXxxTrainer where Xxx is the prediction kind.
- ///
- [BestFriend]
- internal delegate void SignatureTrainer();
+// REVIEW: Would be nice if the registration under SignatureTrainer were automatic
+// given registration for one of the "sub-class" signatures.
- [BestFriend]
- internal delegate void SignatureBinaryClassifierTrainer();
- [BestFriend]
- internal delegate void SignatureMulticlassClassifierTrainer();
- [BestFriend]
- internal delegate void SignatureRegressorTrainer();
- [BestFriend]
- internal delegate void SignatureMultiOutputRegressorTrainer();
- [BestFriend]
- internal delegate void SignatureRankerTrainer();
- [BestFriend]
- internal delegate void SignatureAnomalyDetectorTrainer();
- [BestFriend]
- internal delegate void SignatureClusteringTrainer();
- [BestFriend]
- internal delegate void SignatureSequenceTrainer();
- [BestFriend]
- internal delegate void SignatureMatrixRecommendingTrainer();
+///
+/// Loadable class signatures for trainers. Typically each trainer should register with
+/// both SignatureTrainer and SignatureXxxTrainer where Xxx is the prediction kind.
+///
+[BestFriend]
+internal delegate void SignatureTrainer();
+[BestFriend]
+internal delegate void SignatureBinaryClassifierTrainer();
+[BestFriend]
+internal delegate void SignatureMulticlassClassifierTrainer();
+[BestFriend]
+internal delegate void SignatureRegressorTrainer();
+[BestFriend]
+internal delegate void SignatureMultiOutputRegressorTrainer();
+[BestFriend]
+internal delegate void SignatureRankerTrainer();
+[BestFriend]
+internal delegate void SignatureAnomalyDetectorTrainer();
+[BestFriend]
+internal delegate void SignatureClusteringTrainer();
+[BestFriend]
+internal delegate void SignatureSequenceTrainer();
+[BestFriend]
+internal delegate void SignatureMatrixRecommendingTrainer();
+
+///
+/// The base interface for a trainers. Implementors should not implement this interface directly,
+/// but rather implement the more specific .
+///
+[BestFriend]
+internal interface ITrainer
+{
///
- /// The base interface for a trainers. Implementors should not implement this interface directly,
- /// but rather implement the more specific .
+ /// Auxiliary information about the trainer in terms of its capabilities
+ /// and requirements.
///
- [BestFriend]
- internal interface ITrainer
- {
- ///
- /// Auxiliary information about the trainer in terms of its capabilities
- /// and requirements.
- ///
- TrainerInfo Info { get; }
+ TrainerInfo Info { get; }
- ///
- /// Return the type of prediction task for the produced predictor.
- ///
- PredictionKind PredictionKind { get; }
+ ///
+ /// Return the type of prediction task for the produced predictor.
+ ///
+ PredictionKind PredictionKind { get; }
- ///
- /// Trains a predictor.
- ///
- /// A context containing at least the training data
- /// The trained predictor
- ///
- IPredictor Train(TrainContext context);
- }
+ ///
+ /// Trains a predictor.
+ ///
+ /// A context containing at least the training data
+ /// The trained predictor
+ ///
+ IPredictor Train(TrainContext context);
+}
+///
+/// Strongly typed generic interface for a trainer. A trainer object takes training data
+/// and produces a predictor.
+///
+/// Type of predictor produced
+[BestFriend]
+internal interface ITrainer : ITrainer
+ where TPredictor : IPredictor
+{
///
- /// Strongly typed generic interface for a trainer. A trainer object takes training data
- /// and produces a predictor.
+ /// Trains a predictor.
///
- /// Type of predictor produced
- [BestFriend]
- internal interface ITrainer : ITrainer
- where TPredictor : IPredictor
- {
- ///
- /// Trains a predictor.
- ///
- /// A context containing at least the training data
- /// The trained predictor
- new TPredictor Train(TrainContext context);
- }
+ /// A context containing at least the training data
+ /// The trained predictor
+ new TPredictor Train(TrainContext context);
+}
- [BestFriend]
- internal static class TrainerExtensions
- {
- ///
- /// Convenience train extension for the case where one has only a training set with no auxiliary information.
- /// Equivalent to calling
- /// on a constructed with .
- ///
- /// The trainer
- /// The training data.
- /// The trained predictor
- public static IPredictor Train(this ITrainer trainer, RoleMappedData trainData)
- => trainer.Train(new TrainContext(trainData));
+[BestFriend]
+internal static class TrainerExtensions
+{
+ ///
+ /// Convenience train extension for the case where one has only a training set with no auxiliary information.
+ /// Equivalent to calling
+ /// on a constructed with .
+ ///
+ /// The trainer
+ /// The training data.
+ /// The trained predictor
+ public static IPredictor Train(this ITrainer trainer, RoleMappedData trainData)
+ => trainer.Train(new TrainContext(trainData));
- ///
- /// Convenience train extension for the case where one has only a training set with no auxiliary information.
- /// Equivalent to calling
- /// on a constructed with .
- ///
- /// The trainer
- /// The training data.
- /// The trained predictor
- public static TPredictor Train(this ITrainer trainer, RoleMappedData trainData) where TPredictor : IPredictor
- => trainer.Train(new TrainContext(trainData));
- }
+ ///
+ /// Convenience train extension for the case where one has only a training set with no auxiliary information.
+ /// Equivalent to calling
+ /// on a constructed with .
+ ///
+ /// The trainer
+ /// The training data.
+ /// The trained predictor
+ public static TPredictor Train(this ITrainer trainer, RoleMappedData trainData) where TPredictor : IPredictor
+ => trainer.Train(new TrainContext(trainData));
}
diff --git a/src/Microsoft.ML.Core/Prediction/ITree.cs b/src/Microsoft.ML.Core/Prediction/ITree.cs
index 5371b8c6c3..53fbc839c0 100644
--- a/src/Microsoft.ML.Core/Prediction/ITree.cs
+++ b/src/Microsoft.ML.Core/Prediction/ITree.cs
@@ -4,139 +4,138 @@
using System.Collections.Generic;
-namespace Microsoft.ML.TreePredictor
+namespace Microsoft.ML.TreePredictor;
+
+// The interfaces contained herein are meant to allow tree visualizer to run without an explicit dependency
+// on FastTree, so as to allow it greater generality. These should probably be moved somewhere else, but where?
+// FastTree itself is not a good candidate since their entire purpose was to avoid tying the tree visualizer
+// to FastTree itself. They are semi-tolerable though as a set of internal types here.
+
+///
+/// Predictor that has ensemble tree structures and returns collection of trees.
+///
+[BestFriend]
+internal interface ITreeEnsemble
{
- // The interfaces contained herein are meant to allow tree visualizer to run without an explicit dependency
- // on FastTree, so as to allow it greater generality. These should probably be moved somewhere else, but where?
- // FastTree itself is not a good candidate since their entire purpose was to avoid tying the tree visualizer
- // to FastTree itself. They are semi-tolerable though as a set of internal types here.
-
- ///
- /// Predictor that has ensemble tree structures and returns collection of trees.
- ///
- [BestFriend]
- internal interface ITreeEnsemble
- {
- ///
- /// Returns the number of trees in the ensemble.
- ///
- int NumTrees { get; }
-
- ///
- /// Returns the collection of trees.
- ///
- /// Collection of trees
- ITree[] GetTrees();
- }
-
- ///
- /// Type of tree used in ensemble of tree based predictors
- ///
- [BestFriend]
- internal interface ITree
- {
- ///
- /// Returns the array of right(Greater than) child nodes of every interior nodes
- ///
- int[] GtChild { get; }
-
- ///
- /// Returns the array of left(Leser than or equal to) nodes of every interior nodes
- ///
- int[] LteChild { get; }
-
- ///
- /// returns the number of interior nodes.
- ///
- int NumNodes { get; }
-
- ///
- /// Returns the number of leaf nodes.
- ///
- int NumLeaves { get; }
-
- ///
- /// Returns node structure for the given node
- ///
- /// Node id
- /// Flag to denote whether the node is leaf or not
- /// Feature names collection
- /// Node structure
- INode GetNode(int nodeId, bool isLeaf, IEnumerable featureNames);
- }
-
- ///
- /// Type of tree used in ensemble of tree based predictors
- ///
- /// Type of features container (instance) on which to make predictions
- [BestFriend]
- internal interface ITree : ITree
- {
- ///
- /// Returns the leaf node for the given instance.
- ///
- /// Type of features container (instance) on which to make predictions
- /// node id
- /// Type of features container (instance) on which to make predictions
- int GetLeaf(in TFeatures features);
- }
-
- ///
- /// Type to represent the structure of node
- ///
- [BestFriend]
- internal interface INode
- {
- ///
- /// Returns Key value pairs representing the properties of the node.
- ///
- Dictionary KeyValues { get; }
- }
-
- ///
- /// Keys to represent the properties of node.
- ///
- [BestFriend]
- internal static class NodeKeys
- {
- ///
- /// Name of the the interior node. It is Feature name if it is fasttree. Type is string for default trees.
- ///
- public const string SplitName = "SplitName";
-
- ///
- /// Split gain of the interior node. Type is double for default trees.
- ///
- public const string SplitGain = "SplitGain";
-
- ///
- /// Threshold value of the interior node. Type is string for default trees.
- /// It is expected that the string has exactly two space separated components.
- /// i. The first one should be the operator
- /// ii. The second one should be the actual threshold
- /// For ex., for a split like f1 <= 10, expected Threshold is "<= 10"
- /// For a split like color not-in { blue, green }, expected Threshold is "not-in { blue, green }"
- ///
- public const string Threshold = "Threshold";
-
- ///
- /// Gain value (specific to fasttree) of the interior node. Type is double for default trees.
- ///
- public const string GainValue = "GainValue";
-
- ///
- /// Previous leaf value(specific to fasttree) of the interior node. Type is double for default trees.
- ///
- public const string PreviousLeafValue = "PreviousLeafValue";
-
- ///
- /// Leaf value of the leaf node. Type is double for default trees.
- ///
- public const string LeafValue = "LeafValue";
-
- ///
- /// Extra items that will be displayed in the tool-tip. Type is string for default trees.
- ///
- public const string Extras = "Extras";
- }
+ ///
+ /// Returns the number of trees in the ensemble.
+ ///
+ int NumTrees { get; }
+
+ ///
+ /// Returns the collection of trees.
+ ///
+ /// Collection of trees
+ ITree[] GetTrees();
+}
+
+///
+/// Type of tree used in ensemble of tree based predictors
+///
+[BestFriend]
+internal interface ITree
+{
+ ///
+ /// Returns the array of right(Greater than) child nodes of every interior nodes
+ ///
+ int[] GtChild { get; }
+
+ ///
+ /// Returns the array of left(Leser than or equal to) nodes of every interior nodes
+ ///
+ int[] LteChild { get; }
+
+ ///
+ /// returns the number of interior nodes.
+ ///
+ int NumNodes { get; }
+
+ ///
+ /// Returns the number of leaf nodes.
+ ///
+ int NumLeaves { get; }
+
+ ///
+ /// Returns node structure for the given node
+ ///
+ /// Node id
+ /// Flag to denote whether the node is leaf or not
+ /// Feature names collection
+ /// Node structure
+ INode GetNode(int nodeId, bool isLeaf, IEnumerable featureNames);
+}
+
+///
+/// Type of tree used in ensemble of tree based predictors
+///
+/// Type of features container (instance) on which to make predictions
+[BestFriend]
+internal interface ITree : ITree
+{
+ ///
+ /// Returns the leaf node for the given instance.
+ ///
+ /// Type of features container (instance) on which to make predictions
+ /// node id
+ /// Type of features container (instance) on which to make predictions
+ int GetLeaf(in TFeatures features);
+}
+
+///
+/// Type to represent the structure of node
+///
+[BestFriend]
+internal interface INode
+{
+ ///
+ /// Returns Key value pairs representing the properties of the node.
+ ///
+ Dictionary KeyValues { get; }
+}
+
+///
+/// Keys to represent the properties of node.
+///
+[BestFriend]
+internal static class NodeKeys
+{
+ ///
+ /// Name of the the interior node. It is Feature name if it is fasttree. Type is string for default trees.
+ ///
+ public const string SplitName = "SplitName";
+
+ ///
+ /// Split gain of the interior node. Type is double for default trees.
+ ///
+ public const string SplitGain = "SplitGain";
+
+ ///
+ /// Threshold value of the interior node. Type is string for default trees.
+ /// It is expected that the string has exactly two space separated components.
+ /// i. The first one should be the operator
+ /// ii. The second one should be the actual threshold
+ /// For ex., for a split like f1 <= 10, expected Threshold is "<= 10"
+ /// For a split like color not-in { blue, green }, expected Threshold is "not-in { blue, green }"
+ ///
+ public const string Threshold = "Threshold";
+
+ ///
+ /// Gain value (specific to fasttree) of the interior node. Type is double for default trees.
+ ///
+ public const string GainValue = "GainValue";
+
+ ///
+ /// Previous leaf value(specific to fasttree) of the interior node. Type is double for default trees.
+ ///
+ public const string PreviousLeafValue = "PreviousLeafValue";
+
+ ///
+ /// Leaf value of the leaf node. Type is double for default trees.
+ ///
+ public const string LeafValue = "LeafValue";
+
+ ///
+ /// Extra items that will be displayed in the tool-tip. Type is string for default trees.
+ ///
+ public const string Extras = "Extras";
}
diff --git a/src/Microsoft.ML.Core/Prediction/TrainContext.cs b/src/Microsoft.ML.Core/Prediction/TrainContext.cs
index 8343d21abb..d30d73668f 100644
--- a/src/Microsoft.ML.Core/Prediction/TrainContext.cs
+++ b/src/Microsoft.ML.Core/Prediction/TrainContext.cs
@@ -5,64 +5,63 @@
using Microsoft.ML.Data;
using Microsoft.ML.Runtime;
-namespace Microsoft.ML
+namespace Microsoft.ML;
+
+///
+/// Holds information relevant to trainers. Instances of this class are meant to be constructed and passed
+/// into or .
+/// This holds at least a training set, as well as optionally a predictor.
+///
+[BestFriend]
+internal sealed class TrainContext
{
///
- /// Holds information relevant to trainers. Instances of this class are meant to be constructed and passed
- /// into or .
- /// This holds at least a training set, as well as optionally a predictor.
+ /// The training set. Cannot be null.
///
- [BestFriend]
- internal sealed class TrainContext
- {
- ///
- /// The training set. Cannot be null.
- ///
- public RoleMappedData TrainingSet { get; }
+ public RoleMappedData TrainingSet { get; }
- ///
- /// The validation set. Can be null. Note that passing a non-null validation set into
- /// a trainer that does not support validation sets should not be considered an error condition. It
- /// should simply be ignored in that case.
- ///
- public RoleMappedData ValidationSet { get; }
+ ///
+ /// The validation set. Can be null. Note that passing a non-null validation set into
+ /// a trainer that does not support validation sets should not be considered an error condition. It
+ /// should simply be ignored in that case.
+ ///
+ public RoleMappedData ValidationSet { get; }
- ///
- /// The test set, whose uses are very similar to validation set but it should not directly and indirectly
- /// affect the training process. One major difference between validation set and test test is that validation
- /// can affect the training process by, for example, early stopping. Note that early stopping is a technique
- /// which terminates the training process once the scores computed on validation set starts getting worse.
- ///
- public RoleMappedData TestSet { get; }
+ ///
+ /// The test set, whose uses are very similar to validation set but it should not directly and indirectly
+ /// affect the training process. One major difference between validation set and test test is that validation
+ /// can affect the training process by, for example, early stopping. Note that early stopping is a technique
+ /// which terminates the training process once the scores computed on validation set starts getting worse.
+ ///
+ public RoleMappedData TestSet { get; }
- ///
- /// The initial predictor, for incremental training. Note that if a implementor
- /// does not support incremental training, then it can ignore it similarly to how one would ignore
- /// . However, if the trainer does support incremental training and there
- /// is something wrong with a non-null value of this, then the trainer ought to throw an exception.
- ///
- public IPredictor InitialPredictor { get; }
+ ///
+ /// The initial predictor, for incremental training. Note that if a implementor
+ /// does not support incremental training, then it can ignore it similarly to how one would ignore
+ /// . However, if the trainer does support incremental training and there
+ /// is something wrong with a non-null value of this, then the trainer ought to throw an exception.
+ ///
+ public IPredictor InitialPredictor { get; }
- ///
- /// Constructor, given a training set and optional other arguments.
- ///
- /// Will set to this value. This must be specified
- /// Will set to this value if specified
- /// Will set to this value if specified
- /// Will set to this value if specified
- public TrainContext(RoleMappedData trainingSet, RoleMappedData validationSet = null, RoleMappedData testSet = null, IPredictor initialPredictor = null)
- {
- Contracts.CheckValue(trainingSet, nameof(trainingSet));
- Contracts.CheckValueOrNull(validationSet);
- Contracts.CheckValueOrNull(initialPredictor);
+ ///
+ /// Constructor, given a training set and optional other arguments.
+ ///
+ /// Will set to this value. This must be specified
+ /// Will set to this value if specified
+ /// Will set to this value if specified
+ /// Will set to this value if specified
+ public TrainContext(RoleMappedData trainingSet, RoleMappedData validationSet = null, RoleMappedData testSet = null, IPredictor initialPredictor = null)
+ {
+ Contracts.CheckValue(trainingSet, nameof(trainingSet));
+ Contracts.CheckValueOrNull(validationSet);
+ Contracts.CheckValueOrNull(initialPredictor);
- // REVIEW: Should there be code here to ensure that the role mappings between the two are compatible?
- // That is, all the role mappings are the same and the columns between them have identical types?
+ // REVIEW: Should there be code here to ensure that the role mappings between the two are compatible?
+ // That is, all the role mappings are the same and the columns between them have identical types?
- TrainingSet = trainingSet;
- ValidationSet = validationSet;
- TestSet = testSet;
- InitialPredictor = initialPredictor;
- }
+ TrainingSet = trainingSet;
+ ValidationSet = validationSet;
+ TestSet = testSet;
+ InitialPredictor = initialPredictor;
}
}
diff --git a/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs b/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs
index 2fb046dff8..6f5c6d87a2 100644
--- a/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs
+++ b/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs
@@ -2,83 +2,82 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-namespace Microsoft.ML
+namespace Microsoft.ML;
+
+///
+/// Characteristics of a trainer. Exposed via the Info property of each trainer.
+///
+public sealed class TrainerInfo
{
+ // REVIEW: Ideally trainers should be able to communicate
+ // something about the type of data they are capable of being trained
+ // on, for example, what ColumnKinds they want, how many of each, of what type,
+ // etc. This interface seems like the most natural conduit for that sort
+ // of extra information.
+
///
- /// Characteristics of a trainer. Exposed via the Info property of each trainer.
+ /// Whether the trainer needs to see data in normalized form. Only non-parametric trainers will tend to return
+ /// here.
///
- public sealed class TrainerInfo
- {
- // REVIEW: Ideally trainers should be able to communicate
- // something about the type of data they are capable of being trained
- // on, for example, what ColumnKinds they want, how many of each, of what type,
- // etc. This interface seems like the most natural conduit for that sort
- // of extra information.
+ public bool NeedNormalization { get; }
- ///
- /// Whether the trainer needs to see data in normalized form. Only non-parametric trainers will tend to return
- /// here.
- ///
- public bool NeedNormalization { get; }
-
- ///
- /// Whether the trainer needs calibration to produce probabilities. As a general rule only trainers that produce
- /// binary classifier predictors that also do not have a natural probabilistic interpretation should have a
- /// value here.
- ///
- [BestFriend]
- internal bool NeedCalibration { get; }
+ ///
+ /// Whether the trainer needs calibration to produce probabilities. As a general rule only trainers that produce
+ /// binary classifier predictors that also do not have a natural probabilistic interpretation should have a
+ /// value here.
+ ///
+ [BestFriend]
+ internal bool NeedCalibration { get; }
- ///
- /// Whether this trainer could benefit from a cached view of the data. Trainers that have few passes over the
- /// data, or that need to build their own custom data structure over the data, will have a false here.
- ///
- public bool WantCaching { get; }
+ ///
+ /// Whether this trainer could benefit from a cached view of the data. Trainers that have few passes over the
+ /// data, or that need to build their own custom data structure over the data, will have a false here.
+ ///
+ public bool WantCaching { get; }
- ///
- /// Whether the trainer supports validation set via . Not implementing
- /// this interface and returning false from this property is an indication the trainer does not support
- /// that.
- ///
- [BestFriend]
- internal bool SupportsValidation { get; }
+ ///
+ /// Whether the trainer supports validation set via . Not implementing
+ /// this interface and returning false from this property is an indication the trainer does not support
+ /// that.
+ ///
+ [BestFriend]
+ internal bool SupportsValidation { get; }
- ///
- /// Whether the trainer can use test set via . Not implementing
- /// this interface and returning false from this property is an indication the trainer does not support
- /// that.
- ///
- [BestFriend]
- internal bool SupportsTest { get; }
+ ///
+ /// Whether the trainer can use test set via . Not implementing
+ /// this interface and returning false from this property is an indication the trainer does not support
+ /// that.
+ ///
+ [BestFriend]
+ internal bool SupportsTest { get; }
- ///
- /// Whether the trainer can support incremental trainers via . Not
- /// implementing this interface and returning true from this property is an indication the trainer does
- /// not support that.
- ///
- [BestFriend]
- internal bool SupportsIncrementalTraining { get; }
+ ///
+ /// Whether the trainer can support incremental trainers via . Not
+ /// implementing this interface and returning true from this property is an indication the trainer does
+ /// not support that.
+ ///
+ [BestFriend]
+ internal bool SupportsIncrementalTraining { get; }
- ///
- /// Initializes with the given parameters. The parameters have default values for the most typical values
- /// for most classical trainers.
- ///
- /// The value for the property
- /// The value for the property
- /// The value for the property
- /// The value for the property
- /// The value for the property
- /// The value for the property
- [BestFriend]
- internal TrainerInfo(bool normalization = true, bool calibration = false, bool caching = true,
- bool supportValid = false, bool supportIncrementalTrain = false, bool supportTest = false)
- {
- NeedNormalization = normalization;
- NeedCalibration = calibration;
- WantCaching = caching;
- SupportsValidation = supportValid;
- SupportsIncrementalTraining = supportIncrementalTrain;
- SupportsTest = supportTest;
- }
+ ///
+ /// Initializes with the given parameters. The parameters have default values for the most typical values
+ /// for most classical trainers.
+ ///
+ /// The value for the property
+ /// The value for the property
+ /// The value for the property
+ /// The value for the property
+ /// The value for the property
+ /// The value for the property
+ [BestFriend]
+ internal TrainerInfo(bool normalization = true, bool calibration = false, bool caching = true,
+ bool supportValid = false, bool supportIncrementalTrain = false, bool supportTest = false)
+ {
+ NeedNormalization = normalization;
+ NeedCalibration = calibration;
+ WantCaching = caching;
+ SupportsValidation = supportValid;
+ SupportsIncrementalTraining = supportIncrementalTrain;
+ SupportsTest = supportTest;
}
}