fit¶
- BaseEstimator.fit(X: Union[ndarray, DataFrame], y: Union[ndarray, DataFrame], **kwargs) None[source]¶
Fit the estimator to the data.
This method initializes the data loader, the model, and then starts the training process.
- Parameters:
X (Union[np.ndarray, pd.core.frame.DataFrame]) – The input data.
y (Union[np.ndarray, pd.core.frame.DataFrame]) – The target data.
arguments (Optional keyword) –
eval (bool) – Print settings.
lr (float) – Learning rate for the optimizer.
betas (tuple) – Coefficients used for computing running averages of gradient and its square.
weight_decay (float) – Weight decay (L2 penalty).
eps (float) – Term added to the denominator to improve numerical stability.
amsgrad (bool) – Whether to use the AMSGrad variant of the Adam optimizer.
gamma (float) – Multiplicative factor of learning rate decay.
step_size (float) – Period of learning rate decay.
scheduler_patience (int) – The number of epochs to wait for improvement before stopping early.
min_delta (int) – Minimum change in the monitored quantity to qualify as an improvement.
scheduler (bool) – Whether to use a learning rate scheduler.
scheduler_mode (str) – The mode for the learning rate scheduler.
scheduler_factor (float) – The factor for reducing the learning rate.
scheduler_threshold (float) – The threshold for reducing the learning rate.
lrd (float) – Learning rate decay.
clip_norm (float) – Gradient clipping threshold.
scaler_type (str) – The type of scaler to use.
epochs (int) – The number of epochs to train for.
batch_size (int) – The size of the batches for training.
sequence_length (int) – The length of the sequence for training.
num_workers (int) – The number of worker threads to use for data loading.
validation_cadence (int) – The number of epochs between validation checks.
optim_args (float) – Additional arguments for the optimizer.
shuffle (bool) – Whether to shuffle the data before each epoch.
val_size (float) – The size of the validation set.
early_stopping (bool) – Whether to use early stopping.
pretrained (bool) – Whether to load a pre-trained model.
folder (str) – The folder to save the model to.
- Returns:
None
predict¶
score¶
- ClassifierMixin.score(X: Union[ndarray, DataFrame], y: Union[ndarray, DataFrame])[source]¶
Computes the score of the classifier on the given test data and labels.
- Parameters:
X (Union[np.ndarray, pd.core.frame.DataFrame]) – The test data.
y (Union[np.ndarray, pd.core.frame.DataFrame]) – The true labels for the test data.
- Returns:
The true labels. pred_labels (np.ndarray): The predicted labels.
- Return type:
true_labels (np.ndarray)