veloxml.base package
Submodules
veloxml.base.classification_base module
- class veloxml.base.classification_base.ClassificationBase(model)[source]
Bases:
EstimatorBase
Base class for classification models.
This class provides a foundation for classification models, extending EstimatorBase. It defines common functionality for fitting a model to training data and making predictions, including probability-based predictions.
- model
The underlying classification model instance.
- Type:
object
Initializes the classification base class with a given model.
- Parameters:
model (object) – The classification model instance to be used.
- __init__(model)[source]
Initializes the classification base class with a given model.
- Parameters:
model (object) – The classification model instance to be used.
- fit(X, Y)[source]
Trains the classification model using the given input data and target values.
- Parameters:
X (array-like) – The input features used for training.
Y (array-like) – The target class labels corresponding to X.
- Returns:
The instance itself after fitting the model.
- Return type:
- predict(X)[source]
Predicts class labels based on the given input data.
- Parameters:
X (array-like) – The input features for making predictions.
- Returns:
The predicted class labels.
- Return type:
array-like
- predict_proba(X, Y)[source]
Predicts class probabilities for the given input data.
- Parameters:
X (array-like) – The input features for making probability predictions.
Y (array-like) – The target class labels (this argument may not be necessary, depending on the implementation of the underlying model).
- Returns:
The predicted class probabilities.
- Return type:
array-like
veloxml.base.estimator_base module
- class veloxml.base.estimator_base.EstimatorBase(model)[source]
Bases:
ABC
Abstract base class for all estimators.
This class defines a common interface for all estimators, enforcing the implementation of fit and predict methods in derived classes.
- model
The underlying model instance used for estimation.
- Type:
object
- fit(X, Y)[source]
Abstract method for training the model with input data X and target values Y. Must be implemented in subclasses.
- predict(X)[source]
Abstract method for making predictions based on input data X. Must be implemented in subclasses.
Initializes the estimator with a given model.
- Parameters:
model (object) – The model instance to be used for estimation.
- __init__(model)[source]
Initializes the estimator with a given model.
- Parameters:
model (object) – The model instance to be used for estimation.
veloxml.base.regression_base module
- class veloxml.base.regression_base.RegressionBase(model)[source]
Bases:
EstimatorBase
Base class for regression models.
This class provides a foundation for regression models, extending EstimatorBase. It defines common functionality for fitting a model to training data and making predictions.
- model
The underlying regression model instance.
- Type:
object
Initializes the regression base class with a given model.
- Parameters:
model (object) – The regression model instance to be used.
- __init__(model)[source]
Initializes the regression base class with a given model.
- Parameters:
model (object) – The regression model instance to be used.
veloxml.base.unsupervised_base module
- class veloxml.base.unsupervised_base.UnsupervisedEstimatorBase(model)[source]
Bases:
EstimatorBase
Base class for unsupervised learning models.
This class provides a foundation for unsupervised learning models, extending EstimatorBase. It defines common functionality such as fitting the model, making predictions, and transforming data.
- model
The underlying unsupervised learning model instance.
- Type:
object
- transform(X)[source]
Transforms the input data into a different representation (e.g., dimensionality reduction).
Initializes the unsupervised learning base class with a given model.
- Parameters:
model (object) – The unsupervised learning model instance to be used.
- __init__(model)[source]
Initializes the unsupervised learning base class with a given model.
- Parameters:
model (object) – The unsupervised learning model instance to be used.
- fit(X, Y=None)[source]
Trains the unsupervised learning model using the given input data.
- Parameters:
X (array-like) – The input features used for training.
Y (array-like, optional) – Unused parameter included for compatibility.
- Returns:
The instance itself after fitting the model.
- Return type:
- fit_predict(X)[source]
Fits the model to the data and then returns predictions.
This is commonly used in clustering models.
- Parameters:
X (array-like) – The input data.
- Returns:
The predicted labels or other outputs after fitting the model.
- Return type:
array-like
- fit_transform(X)[source]
Fits the model to the data and then transforms it.
This is commonly used in dimensionality reduction techniques.
- Parameters:
X (array-like) – The input data.
- Returns:
The transformed representation of the input data.
- Return type:
array-like
- predict(X, Y=None)[source]
Predicts outputs based on the given input data.
In clustering models, this typically returns cluster labels.
- Parameters:
X (array-like) – The input features for making predictions.
Y (array-like, optional) – Unused parameter included for compatibility.
- Returns:
The predicted labels or other outputs.
- Return type:
array-like