Skip to content

Commit

Permalink
Correcting linear models hierarchy (#797)
Browse files Browse the repository at this point in the history
* Correcting linear models hierarchy

 - correct: get_attributes

* Update linear_model.py

* Update test_base_model_methods.py

* Update test_base_model_methods.py

* Update linear_model.py
  • Loading branch information
oualib authored Nov 1, 2023
1 parent d86da45 commit 638e2ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions verticapy/machine_learning/vertica/linear_model.py
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

0 comments on commit 638e2ae

Please sign in to comment.