Class OptimizationStepData<T, TInput, TOutput>
public class OptimizationStepData<T, TInput, TOutput>
Type Parameters
TTInputTOutput
- Inheritance
-
OptimizationStepData<T, TInput, TOutput>
- Inherited Members
Constructors
OptimizationStepData()
Initializes a new instance of the OptimizationStepData class with default values.
public OptimizationStepData()
Remarks
This constructor creates a new OptimizationStepData instance with default values. It initializes the FitnessScore to zero and creates an appropriate model based on the generic type parameters. For Vector models, it uses an empty vector. For Neural Network models, it creates a minimal network architecture. This constructor is useful when creating a new optimization step data object before the actual optimization step is performed.
For Beginners: This constructor creates a new optimization step data object with default values.
When creating a new optimization step data:
- The fitness score is set to zero
- An appropriate empty model is created based on your data types
- Other properties are set to empty collections or default objects
This constructor intelligently chooses the right model type based on what kind of input and output data you're working with.
Properties
EvaluationData
Gets or sets the comprehensive evaluation data for this optimization step.
public ModelEvaluationData<T, TInput, TOutput> EvaluationData { get; set; }
Property Value
- ModelEvaluationData<T, TInput, TOutput>
A ModelEvaluationData<T> object containing detailed evaluation results.
Remarks
This property contains comprehensive evaluation data for the solution in this optimization step. The ModelEvaluationData object includes detailed statistics and performance metrics for the model on the training, validation, and test datasets. This includes error statistics, prediction quality metrics, and other measures that provide a complete picture of the model's performance. This detailed evaluation data is valuable for in-depth analysis of the model's strengths and weaknesses and for making informed decisions about model selection.
For Beginners: This contains detailed performance information about the model across all datasets.
The evaluation data:
- Contains comprehensive statistics about model performance
- Includes results for training, validation, and test datasets
- Provides multiple metrics beyond just the fitness score
This detailed information is valuable because:
- It allows for deeper analysis of model behavior
- It helps identify specific strengths and weaknesses
- It provides context for the fitness score
For example, it might show that a model has low error on average but performs poorly on certain types of cases, revealing areas for improvement.
FitDetectionResult
Gets or sets the result of overfitting detection for this optimization step.
public FitDetectorResult<T> FitDetectionResult { get; set; }
Property Value
- FitDetectorResult<T>
A FitDetectorResult<T> object containing information about potential overfitting.
Remarks
This property contains the result of overfitting detection analysis for this optimization step. Overfitting occurs when a model performs well on training data but poorly on new, unseen data. The FitDetectorResult object typically includes information about whether overfitting has been detected, the severity of the overfitting, and possibly recommendations for addressing it. This information is crucial for selecting models that will generalize well to new data rather than just memorizing the training data.
For Beginners: This contains information about whether the model is overfitting to the training data.
The fit detection result:
- Indicates whether overfitting has been detected
- May include measures of how severe the overfitting is
- Helps identify models that won't perform well on new data
Overfitting happens when a model learns the training data too well, including its noise and peculiarities, making it perform poorly on new data.
This information is important because:
- It helps avoid selecting models that won't generalize well
- It provides insight into the model's learning behavior
- It can guide decisions about regularization or model complexity
FitnessScore
Gets or sets the fitness score for this optimization step.
public T FitnessScore { get; set; }
Property Value
- T
A value of type T representing the fitness or objective function value.
Remarks
This property contains the fitness score for the solution in this optimization step. The fitness score is a measure of how good the solution is according to some objective function. In optimization, higher fitness scores typically indicate better solutions for maximization problems, while lower scores indicate better solutions for minimization problems. The fitness score is a key metric for comparing different solutions and guiding the optimization process toward better solutions.
For Beginners: This contains a single number that represents how good the model is.
The fitness score:
- Measures how well the model performs
- Is what the optimization process is trying to improve
- Can be something to maximize (like accuracy) or minimize (like error)
This score is important because:
- It allows direct comparison between different models
- It guides the optimization process toward better solutions
- It helps determine when the optimization is complete
For example, if optimizing for prediction accuracy, a fitness score of 0.95 would indicate the model correctly predicts 95% of cases.
SelectedFeatures
Gets or sets the list of selected feature vectors for this optimization step.
public List<Vector<T>> SelectedFeatures { get; set; }
Property Value
- List<Vector<T>>
A list of Vector<T> objects representing the selected features.
Remarks
This property contains a list of feature vectors that were selected for use in this optimization step. Feature selection is a common technique in machine learning to improve model performance by focusing on the most relevant features and reducing dimensionality. Each vector in the list represents a selected feature, and the collection as a whole represents the subset of features used to train and evaluate the solution in this optimization step.
For Beginners: This contains the specific input variables (features) that were used for this model.
The selected features:
- Are the input variables chosen for this model
- Are stored as a list of vectors, where each vector represents one feature
- May be a subset of all available features
Feature selection is important because:
- Using only relevant features can improve model performance
- It reduces model complexity and training time
- It can help prevent overfitting
For example, if predicting house prices, this might contain selected features like square footage and location, but might exclude less relevant features.
Solution
Gets or sets the current solution (model) for this optimization step.
public IFullModel<T, TInput, TOutput> Solution { get; set; }
Property Value
- IFullModel<T, TInput, TOutput>
XTestSubset
public TInput XTestSubset { get; set; }
Property Value
- TInput
XTrainSubset
public TInput XTrainSubset { get; set; }
Property Value
- TInput
XValSubset
public TInput XValSubset { get; set; }
Property Value
- TInput