vastorbit.machine_learning.memmodel.linear_model.LinearModel.predict_proba¶
- LinearModel.predict_proba(X: Annotated[list | ndarray, 'Array Like Structure']) ndarray¶
Computes the model’s probabilites using the input matrix.
- Parameters:
X (ArrayLike) – The data on which to make the prediction.
- Returns:
Probabilities.
- Return type:
numpy.array
Examples
Import the required module.
from vastorbit.machine_learning.memmodel.linear_model import LinearModelClassifier
We will use the following attributes:
coefficients = [0.5, 1.2] intercept = 2.0
Let’s create a model.
model_lm = LinearModelClassifier(coefficients, intercept)
Create a dataset.
data = [[1.0, 0.3], [2.0, -0.6]]
Compute the predictions.
model_lm.predict_proba(data)
Note
Refer to
LinearModelClassifierfor more information about the different methods and usages.