Poly Regression

Module: deeprai.models.regression.poly_regression


Class: PolyRegression

A class representation of the polynomial regression model.


1. Initializer: __init__(self)

Description:

Initializes the PolyRegression class.

Attributes:

Example:

from deeprai.models.regression import PolyRegression

model = PolyRegression()

2. Method: fit(self, x_vals, y_vals)

Description:

Fit the model to the given x_vals and y_vals using polynomial regression.

Parameters:

Returns:

Example:

model.fit(x_vals=[1, 2, 3], y_vals=[2, 5, 10])

3. Method: run(self, x_val)

Description:

Use the previously fitted model to predict the output for a given x_val based on the polynomial equation.

Parameters:

Returns:

Example:

predicted_val = model.run(4)
print(predicted_val)

Revision #1
Created 6 September 2023 13:22:47 by Kieran Carter
Updated 6 September 2023 13:28:54 by Kieran Carter