Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correcting linear models hierarchy #797

Merged
merged 6 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions verticapy/machine_learning/vertica/linear_model.py
oualib marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def plot(
"""


class ElasticNet(Regressor, LinearModel):
class ElasticNet(LinearModel, Regressor):
"""
Creates an ElasticNet object using the Vertica
Linear Regression algorithm. The Elastic Net
Expand Down Expand Up @@ -698,7 +698,7 @@ def __init__(
}


class Lasso(Regressor, LinearModel):
class Lasso(LinearModel, Regressor):
"""
Creates a Lasso object using the Vertica
Linear Regression algorithm.
Expand Down Expand Up @@ -1140,7 +1140,7 @@ def __init__(
}


class LinearRegression(Regressor, LinearModel):
class LinearRegression(LinearModel, Regressor):
"""
Creates a LinearRegression object using the Vertica
Linear Regression algorithm.
Expand Down Expand Up @@ -2031,7 +2031,7 @@ def __init__(
}


class Ridge(Regressor, LinearModel):
class Ridge(LinearModel, Regressor):
"""
Creates a Ridge object using the Vertica
Linear Regression algorithm.
Expand Down Expand Up @@ -2501,7 +2501,7 @@ def __init__(
"""


class LogisticRegression(BinaryClassifier, LinearModelClassifier):
class LogisticRegression(LinearModelClassifier, BinaryClassifier):
"""
Creates a LogisticRegression object using the Vertica
Logistic Regression algorithm.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ def test_get_attributes(self, get_models, model_class):
"features_importance_trees_",
]
else:
vpy_model_attributes = []
vpy_model_attributes = ["coef_", "intercept_", "features_importance_"]

assert get_models.vpy.model.get_attributes() == vpy_model_attributes

Expand Down