Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
oualib committed Nov 3, 2023
1 parent 3f6604b commit 31e77c9
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions verticapy/machine_learning/memmodel/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ class RandomForestRegressor(Ensemble):
**Initalization**
A Random Forest Regressor model is an ensemble of multiple binary
tree regressor models. In this example, we will create three
A Random Forest Regressor model is an ensemble of multiple binary
tree regressor models. In this example, we will create three
:py:mod:`verticapy.machine_learning.memmodel.tree.BinaryTreeRegressor`
models:
Expand Down Expand Up @@ -133,7 +133,7 @@ class RandomForestRegressor(Ensemble):
)
Now we will use above models to create
:py:mod:`verticapy.machine_learning.memmodel.ensemble.RandomForestRegressor`
:py:mod:`verticapy.machine_learning.memmodel.ensemble.RandomForestRegressor`
model.
.. ipython:: python
Expand Down Expand Up @@ -168,7 +168,7 @@ class RandomForestRegressor(Ensemble):
Use
:py:meth:`verticapy.machine_learning.memmodel.ensemble.RandomForestRegressor.predict_sql`
method to get the SQL code needed to deploy the model using
method to get the SQL code needed to deploy the model using
its attributes.
.. ipython:: python
Expand All @@ -178,7 +178,7 @@ class RandomForestRegressor(Ensemble):
.. hint::
This object can be pickled and used in any in-memory
environment, just like `SKLEARN <https://scikit-learn.org/>`_
environment, just like `SKLEARN <https://scikit-learn.org/>`_
models.
**Drawing Trees**
Expand Down Expand Up @@ -266,7 +266,7 @@ def predict_sql(self, X: ArrayLike) -> str:

class RandomForestClassifier(Ensemble, MulticlassClassifier):
"""
:py:mod:`verticapy.machine_learning.memmodel.base.InMemoryModel`
:py:mod:`verticapy.machine_learning.memmodel.base.InMemoryModel`
implementation of the random forest classifier algorithm.
Parameters
Expand All @@ -282,7 +282,7 @@ class RandomForestClassifier(Ensemble, MulticlassClassifier):
**Initalization**
A Random Forest Classifier model is an ensemble of multiple binary
tree classifier models. In this example, we will create three
tree classifier models. In this example, we will create three
:py:mod:`verticapy.machine_learning.memmodel.tree.BinaryTreeClassifier`
models:
Expand Down Expand Up @@ -316,7 +316,7 @@ class RandomForestClassifier(Ensemble, MulticlassClassifier):
)
Now we will use above models to create
:py:mod:`verticapy.machine_learning.memmodel.ensemble.RandomForestClassifier`
:py:mod:`verticapy.machine_learning.memmodel.ensemble.RandomForestClassifier`
model.
.. ipython:: python
Expand Down Expand Up @@ -344,7 +344,7 @@ class RandomForestClassifier(Ensemble, MulticlassClassifier):
model_rfc.predict(data)
Use
Use
:py:meth:`verticapy.machine_learning.memmodel.ensemble.RandomForestClassifier.predict_proba`
method to compute the predicted probabilities for each class.
Expand All @@ -362,7 +362,7 @@ class RandomForestClassifier(Ensemble, MulticlassClassifier):
Use
:py:meth:`verticapy.machine_learning.memmodel.ensemble.RandomForestClassifier.predict_sql`
method to get the SQL code needed to deploy the model using
method to get the SQL code needed to deploy the model using
its attributes.
.. ipython:: python
Expand All @@ -381,7 +381,7 @@ class RandomForestClassifier(Ensemble, MulticlassClassifier):
.. hint::
This object can be pickled and used in any in-memory
environment, just like `SKLEARN <https://scikit-learn.org/>`_
environment, just like `SKLEARN <https://scikit-learn.org/>`_
models.
**Drawing Trees**
Expand Down Expand Up @@ -526,7 +526,7 @@ class XGBRegressor(Ensemble):
**Initalization**
A model is an ensemble of multiple binary tree regressors.
In this example, we will create three
In this example, we will create three
:py:mod:`verticapy.machine_learning.memmodel.tree.BinaryTreeRegressor`
models.
Expand Down Expand Up @@ -557,7 +557,7 @@ class XGBRegressor(Ensemble):
)
Now we will use above models to create
:py:mod:`verticapy.machine_learning.memmodel.ensemble.XGBRegressor`
:py:mod:`verticapy.machine_learning.memmodel.ensemble.XGBRegressor`
model.
.. ipython:: python
Expand All @@ -570,7 +570,7 @@ class XGBRegressor(Ensemble):
eta = 0.9,
)
.. note::
.. note::
We have used *mean* that represents average of the response column
and *eta* that represents learning rate of XG Boost regressor model.
Expand Down Expand Up @@ -602,7 +602,7 @@ class XGBRegressor(Ensemble):
Use
:py:meth:`verticapy.machine_learning.memmodel.ensemble.XGBRegressor.predict_sql`
method to get the SQL code needed to deploy the model using
method to get the SQL code needed to deploy the model using
its attributes.
.. ipython:: python
Expand All @@ -612,7 +612,7 @@ class XGBRegressor(Ensemble):
.. hint::
This object can be pickled and used in any in-memory
environment, just like `SKLEARN <https://scikit-learn.org/>`_
environment, just like `SKLEARN <https://scikit-learn.org/>`_
models.
**Drawing Trees**
Expand Down Expand Up @@ -708,7 +708,7 @@ def predict_sql(self, X: ArrayLike) -> str:

class XGBClassifier(Ensemble, MulticlassClassifier):
"""
:py:mod:`verticapy.machine_learning.memmodel.base.InMemoryModel`
:py:mod:`verticapy.machine_learning.memmodel.base.InMemoryModel`
implementation of the XGBoost classifier algorithm.
Parameters
Expand All @@ -728,8 +728,8 @@ class XGBClassifier(Ensemble, MulticlassClassifier):
**Initalization**
A XGBoost Classifier model is an ensemble of multiple binary
tree classifier models. In this example, we will create three
A XGBoost Classifier model is an ensemble of multiple binary
tree classifier models. In this example, we will create three
:py:mod:`verticapy.machine_learning.memmodel.tree.BinaryTreeClassifier`
models:
Expand Down Expand Up @@ -763,7 +763,7 @@ class XGBClassifier(Ensemble, MulticlassClassifier):
)
Now we will use above models to create
:py:mod:`verticapy.machine_learning.memmodel.ensemble.XGBClassifier`
:py:mod:`verticapy.machine_learning.memmodel.ensemble.XGBClassifier`
model.
.. ipython:: python
Expand All @@ -777,10 +777,10 @@ class XGBClassifier(Ensemble, MulticlassClassifier):
learning_rate = 0.1,
)
.. note::
.. note::
We have used *logodds* that represents logodds of the response
column and *learning_rate* that represents learning rate of
We have used *logodds* that represents logodds of the response
column and *learning_rate* that represents learning rate of
XGBoost regressor model. Both are optional parameters.
Create a dataset.
Expand All @@ -799,7 +799,7 @@ class XGBClassifier(Ensemble, MulticlassClassifier):
model_xgbc.predict(data)
Use
Use
:py:meth:`verticapy.machine_learning.memmodel.ensemble.XGBClassifier.predict_proba`
method to compute the predicted probabilities for each class.
Expand All @@ -817,7 +817,7 @@ class XGBClassifier(Ensemble, MulticlassClassifier):
Use
:py:meth:`verticapy.machine_learning.memmodel.ensemble.XGBClassifier.predict_sql`
method to get the SQL code needed to deploy the model using
method to get the SQL code needed to deploy the model using
its attributes.
.. ipython:: python
Expand All @@ -836,7 +836,7 @@ class XGBClassifier(Ensemble, MulticlassClassifier):
.. hint::
This object can be pickled and used in any in-memory
environment, just like `SKLEARN <https://scikit-learn.org/>`_
environment, just like `SKLEARN <https://scikit-learn.org/>`_
models.
**Drawing Trees**
Expand Down Expand Up @@ -953,7 +953,7 @@ def predict_proba_sql(self, X: ArrayLike) -> list[str]:

class IsolationForest(Ensemble):
"""
:py:mod:`verticapy.machine_learning.memmodel.base.InMemoryModel`
:py:mod:`verticapy.machine_learning.memmodel.base.InMemoryModel`
implementation of the isolation forest algorithm.
Parameters
Expand All @@ -966,8 +966,8 @@ class IsolationForest(Ensemble):
**Initalization**
An Isolation Forest model is an ensemble of multiple binary tree
anomaly models. In this example, we will create three
An Isolation Forest model is an ensemble of multiple binary tree
anomaly models. In this example, we will create three
:py:mod:`verticapy.machine_learning.memmodel.tree.BinaryTreeAnomaly`
models:
Expand Down Expand Up @@ -1001,7 +1001,7 @@ class IsolationForest(Ensemble):
)
Now we will use above models to create
:py:mod:`verticapy.machine_learning.memmodel.ensemble.IsolationForest`
:py:mod:`verticapy.machine_learning.memmodel.ensemble.IsolationForest`
model.
.. ipython:: python
Expand Down Expand Up @@ -1036,7 +1036,7 @@ class IsolationForest(Ensemble):
Use
:py:meth:`verticapy.machine_learning.memmodel.ensemble.IsolationForest.predict_sql`
method to get the SQL code needed to deploy the model using
method to get the SQL code needed to deploy the model using
its attributes.
.. ipython:: python
Expand All @@ -1046,7 +1046,7 @@ class IsolationForest(Ensemble):
.. hint::
This object can be pickled and used in any in-memory
environment, just like `SKLEARN <https://scikit-learn.org/>`_
environment, just like `SKLEARN <https://scikit-learn.org/>`_
models.
**Drawing Trees**
Expand Down

0 comments on commit 31e77c9

Please sign in to comment.