Details
The Model Persistence & Prediction subsystem in AlphaPy manages the complete lifecycle of trained machine learning models, including serialization, storage, and retrieval of model artifacts for future inference.
save_model
Acts as the central orchestrator for the model persistence subsystem. It coordinates the saving of all components associated with a trained machine learning model, ensuring data consistency and completeness for future retrieval and deployment. This function serves as the primary entry point for persisting a model.
save_predictor
Responsible for the serialization and storage of the trained machine learning model object itself (e.g., a scikit-learn estimator, Keras model, XGBoost booster). This is the fundamental artifact required for making new predictions.
save_feature_map
Specifically handles the serialization and storage of the feature mapping or transformation pipeline used by the model. This ensures that new input data can be preprocessed consistently before inference, maintaining the integrity of the model's input requirements.
save_predictions
Manages the saving of the predictions generated by the model, typically from a validation or test set. This is crucial for post-hoc performance analysis, debugging, and potential future ensemble building or reporting.