sharkpy.predicting

Functions

predict(self[, X])

Make predictions using the trained model.

predict_baseline(self)

Make a baseline prediction with all features at minimum values.

_validate_and_process_input(self, X)

Helper method to validate and process input data

Module Contents

sharkpy.predicting.predict(self, X=None)[source]

Make predictions using the trained model.

Parameters:

X – dict, DataFrame, or array-like, optional Input samples to predict. If None, predicts on training data. Can be: - dict: Single prediction scenario {‘feature1’: value1, ‘feature2’: value2} - list of dicts: Multiple scenarios [{‘feature1’: value1}, {‘feature1’: value2}] - DataFrame: Multiple samples with feature columns - array-like: Raw feature values

Returns:

Predicted values

Return type:

float, str, or array

sharkpy.predicting.predict_baseline(self)[source]

Make a baseline prediction with all features at minimum values.

Returns:

Baseline prediction

Return type:

float or str

sharkpy.predicting._validate_and_process_input(self, X)[source]

Helper method to validate and process input data