Linear Regression Plot

In [97]:
from verticapy.datasets import load_titanic
titanic = load_titanic()
titanic["y"] = "2 * age + 1 + 40 * RANDOM()"
titanic["x"] = "age + RANDOM()"

from verticapy.learn.linear_model import LinearRegression
model = LinearRegression("model_family")
model.drop()
model.fit(titanic, ["x"], "y")
model.plot()
Out[97]:
<AxesSubplot:xlabel='"x"', ylabel='"y"'>