Linear Module#

Note

If you haven’t yet, please check the section How to configure your auth key before running the code snippets in this page.

The Linear Models module is built to train and consume linear models your Jai environment.

The methods of this module are exclusively to help you train and consume your linear models in Jai.

For more information, see the full Linear Model class reference.

LinearModel#

Bellow, a simple example to instantiate the LinearModel class:

>>> from jai import LinearModel
...
>>> model = LinearModel(name)

set_parameters#

First step to train a new linear model is to define its parameters.

>>> from jai import LinearModel
...
>>> model = LinearModel(name)
>>> model.set_parameters(model_parameters={})

fit#

Train a Linear model.

>>> from jai import LinearModel
...
>>> model = LinearModel(name)
>>> model.fit(X, y)

learn#

Improves an existing model with informantion from a new data.

>>> from jai import LinearModel
...
>>> model = LinearModel(name)
>>> model.learn(X, y)

predict#

Makes a prediction.

>>> from jai import LinearModel
...
>>> model = LinearModel(name)
>>> model.predict(X)

Inherited from TaskBase#

name#

This attribute contains the value of the database’s name.

>>> from jai import LinearModel
...
>>> model = LinearModel(name)
>>> model.name

db_type#

This attribute returns the type of the database.

>>> from jai import LinearModel
...
>>> model = LinearModel(name)
>>> model.db_type

is_valid#

This method returns a boolean indicating if the database exists or not.

>>> from jai import LinearModel
...
>>> model = LinearModel(name)
>>> model.is_valid()

describe#

This method returns the full configuration information of the database.

>>> from jai import LinearModel
...
>>> model = LinearModel(name)
>>> model.describe()