IFullModel<T, TInput, TOutput>
Interfaces · AiDotNet.Interfaces
Represents a complete machine learning model that combines prediction capabilities with serialization and checkpointing support.
Implements: ICheckpointableModel, ICloneable<IFullModel<T, TInput, TOutput>>, IDisposable, IFeatureImportance<T>, IModelSerializer, IModel<TInput, TOutput, ModelMetadata<T>>, IParameterizable<T, TInput, TOutput>
Known implementations: AiModelResult<T, TInput, TOutput>, IAnomalyDetector<T>, IAudioEventDetector<T>, IAudioGenerator<T>, IAutoMLModel<T, TInput, TOutput>, ICausalModel<T>, IClassifier<T>, IClustering<T>, ICodeModel<T>, IDiffusionModel<T>, IDocumentModel<T>, IDropoutModel<T, TInput, TOutput>, IFinancialModel<T>, IFinancialNLPModel<T>, IGaussianProcess<T>, IGenreClassifier<T>, IGradientModel<T, TInput, TOutput>, IMultiLabelClassifier<T>, IMusicSourceSeparator<T>, INERModel<T>, INeuralNetwork<T>, INoisePredictor<T>, IOnlineLearningModel<T>, IProbabilisticModel<T, TInput, TOutput>, IProbabilisticModel<T, TInput, TOutput>, IProgramSynthesizer<T>, IRLAgent<T>, IRegression<T>, ISceneClassifier<T>, ISegmentationModel<T>, IShardedModel<T, TInput, TOutput>, ISpeakerDiarizer<T>, ISpeakerEmbeddingExtractor<T>, ISpeakerVerifier<T>, ISpeechRecognizer<T>, ISurvivalModel<T>, ITextToSpeech<T>, ITimeSeriesModel<T>, IVAEModel<T>, IVideoModel<T>, ModelBase<T, TInput, TOutput>, ModelIndividual<T, TInput, TOutput, TGene>, ModelWrapperBase<T, TInput, TOutput>, MultiOutputRegressor<T>, OnnxFullModelAdapter<T>
How It Works
For Beginners: This interface combines all the important capabilities that a complete AI model needs.
Think of IFullModel as the core contract for a machine learning model. It provides:
- The ability to make predictions (from IModel)
- Process input data and produce output predictions
- The ability to save and load the model (from IModelSerializer and ICheckpointableModel)
- File-based saving/loading for deployment
- Stream-based checkpointing for training resumption
- Feature importance reporting (from IFeatureImportance)
- Understand which features contribute most to predictions
Optional capabilities (check with ‘is’ or InterfaceGuard before using):
- IParameterizable: Get/set model parameters (linear models, neural networks)
- IGradientComputable: Compute and apply gradients (gradient-based optimization)
- IFeatureAware: Feature selection and tracking
Not all models support all capabilities. Tree-based and ensemble models may not implement IParameterizable or IGradientComputable.
This is particularly useful for production environments where models need to be:
- Trained once (which might take a long time)
- Saved to disk for deployment
- Checkpointed during training to prevent data loss
- Loaded quickly when needed to make predictions
- Possibly trained in a distributed manner across multiple GPUs
- Updated with new data periodically
- Used in knowledge distillation as teacher or student models
Properties
| Property | Summary |
|---|---|
ILossFunction<T> DefaultLossFunction { get; } |
Gets the default loss function used by this model for gradient computation. |