Skip to content

Commit

Permalink
edits (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
ansleis authored Jun 4, 2021
1 parent a188213 commit 6598849
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions verticapy/learn/vmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5115,7 +5115,7 @@ def plot(
):
"""
---------------------------------------------------------------------------
Draws the Decomposition scatter plot.
Draws a decomposition scatter plot.
Parameters
----------
Expand Down Expand Up @@ -5145,7 +5145,7 @@ def plot_circle(
):
"""
---------------------------------------------------------------------------
Draws the Decomposition Circle.
Draws a decomposition circle.
Parameters
----------
Expand Down
19 changes: 10 additions & 9 deletions verticapy/stats/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,30 +334,31 @@ def cochrane_orcutt(
):
"""
---------------------------------------------------------------------------
Cochrane Orcutt.
Performs a Cochrane-Orcutt estimation.
Parameters
----------
model: vModel
Linear Regression Object.
Linear regression object.
vdf: vDataFrame / str
Input relation.
ts: str
vcolumn used as timeline. It will be to use to order the data. It can be
a numerical or type date like (date, datetime, timestamp...) vcolumn.
vcolumn of numeric or date-like type (date, datetime, timestamp, etc.)
used as the timeline and to order the data.
prais_winsten: bool, optional
If set to True, the first term is not lost which leads to more precision.
This configuration is called the Prais–Winsten estimation.
If true, retains the first observation of the time series, increasing
precision and efficiency. This configuration is called the
Prais–Winsten estimation.
drop_tmp_model: bool, optional
If set to True, it drops the temporary model.
If true, it drops the temporary model.
Returns
-------
model
A Linear Model with the different information stored as attributes:
- coef_ : Model's coefficients.
- pho_ : Cochrane Orcutt pho.
- anova_table_ : Anova Table.
- pho_ : Cochrane-Orcutt pho.
- anova_table_ : ANOVA table.
- r2_ : R2
"""
check_types(
Expand Down
14 changes: 7 additions & 7 deletions verticapy/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@ def pandas_to_vertica(
"""
---------------------------------------------------------------------------
Ingests a pandas DataFrame into the Vertica database by creating a CSV file
and then using flex tables. It will create a temporary local table and it
will be dropped at the end of the local session.
Use vDataFrame.to_db to store it inside the Database.
and then using flex tables. This creates a temporary local table that
will be dropped at the end of the local session. Use vDataFrame.to_db
to store it inside the database.
Parameters
----------
Expand Down Expand Up @@ -710,12 +710,12 @@ def read_csv(
insert: bool, optional
If set to True, the data will be ingested to the input relation. Be sure
that your file has a header corresponding to the name of the relation
columns otherwise the ingestion will not work.
columns, otherwise ingestion will fail.
temporary_table: bool, optional
If set to True, a temporary table will be created.
temporary_local_table: bool, optional
If set to True, a temporary local table will be created. The parameter 'schema'
has to be empty, otherwise this parameter is ignored.
must to be empty, otherwise this parameter is ignored.
Returns
-------
Expand Down Expand Up @@ -908,8 +908,8 @@ def read_json(
temporary_table: bool, optional
If set to True, a temporary table will be created.
temporary_local_table: bool, optional
If set to True, a temporary local table will be created. The parameter 'schema'
is then ignored.
If set to True, a temporary local table will be created and the parameter
'schema' is ignored.
Returns
-------
Expand Down
27 changes: 13 additions & 14 deletions verticapy/vdataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -3264,20 +3264,20 @@ def balance(
---------------------------------------------------------------------------
Balances the dataset using the input method.
\u26A0 Warning : The result may be inconsistent between attempts at SQL
code generation if the data are not sorted.
\u26A0 Warning : If the data is not sorted, the generated SQL code may
differ between attempts.
Parameters
----------
column: str
Column used to compute the different categories.
method: str, optional
The Sample method.
hybrid : hybrid sampling.
over : over sampling.
under : under sampling.
The method with which to sample the data
hybrid : hybrid sampling
over : oversampling
under : undersampling
x: float, optional
The desired ratio between the majority class and the minority classes.
The desired ratio between the majority class and minority classes.
Only used when method is 'over' or 'under'.
order_by: list, optional
vColumns used to sort the data.
Expand Down Expand Up @@ -3552,26 +3552,25 @@ def cdt(self,
tcdt: bool = True):
"""
---------------------------------------------------------------------------
Returns the Completely Disjonctive Table of the vDataFrame.
The numerical features are transformed to categorical ones using
Returns the complete disjunctive table of the vDataFrame.
Numerical features are transformed to categorical using
the 'discretize' method. Applying PCA on TCDT leads to MCA
(Multiple correspondence analysis).
\u26A0 Warning : This method can become computationally expensive when
dealing with categorical variables having too many
categories.
used with categorical variables with many categories.
Parameters
----------
columns: list, optional
List of the vColumns names.
max_cardinality: int, optional
For any categorical variable, keeps the 'max_cardinality' most frequent
categories and merge the other into one unique category.
For any categorical variable, keeps the most frequent categories and
merges the less frequent categories into a new unique category.
nbins: int, optional
Number of bins used for the discretization (must be > 1).
tcdt: bool, optional
If set to True, returns the Transformed Completely Disjonctive Table
If set to True, returns the transformed complete disjunctive table
(TCDT).
Returns
Expand Down

0 comments on commit 6598849

Please sign in to comment.