Loading...

vastorbit.machine_learning.memmodel.linear_model.LinearModelClassifier.predict_proba_sql

LinearModelClassifier.predict_proba_sql(X: Annotated[list | ndarray, 'Array Like Structure']) list[str]

Returns the SQL code needed to deploy the model probabilities using its attributes.

Parameters:

X (ArrayLike) – The names or values of the input predictors.

Returns:

SQL code.

Return type:

list

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_lmc = LinearModelClassifier(coefficients, intercept)

Let’s use the following column names:

cnames = ['col1', 'col2']

Get the SQL code needed to deploy the model.

model_lmc.predict_proba_sql(cnames)

Note

Refer to LinearModelClassifier for more information about the different methods and usages.