diff --git a/verticapy/core/vdataframe/_corr.py b/verticapy/core/vdataframe/_corr.py index dd0f1d179..d8fc72927 100755 --- a/verticapy/core/vdataframe/_corr.py +++ b/verticapy/core/vdataframe/_corr.py @@ -53,6 +53,7 @@ def _aggregate_matrix( mround: int = 3, show: bool = True, chart: Optional[PlottingObject] = None, + with_numbers: bool = True, **style_kwargs, ) -> PlottingObject: """ @@ -508,7 +509,7 @@ def _aggregate_matrix( "vmax": vmax, "vmin": vmin, "mround": mround, - "with_numbers": True, + "with_numbers": with_numbers, } return vpy_plt.HeatMap(data=data, layout=layout).draw(**kwargs) values = {"index": columns} @@ -548,6 +549,7 @@ def _aggregate_vector( mround: int = 3, show: bool = True, chart: Optional[PlottingObject] = None, + with_numbers: bool = True, **style_kwargs, ) -> PlottingObject: """ @@ -728,7 +730,7 @@ def _aggregate_vector( "vmax": vmax, "vmin": vmin, "mround": mround, - "with_numbers": True, + "with_numbers": with_numbers, } return vpy_plt.HeatMap(data=data, layout=layout).draw(**kwargs) for idx, column in enumerate(cols): @@ -755,6 +757,7 @@ def corr( focus: Optional[str] = None, show: bool = True, chart: Optional[PlottingObject] = None, + with_numbers: bool = True, **style_kwargs, ) -> PlottingObject: """ @@ -872,10 +875,10 @@ def corr( } ) fig = data.corr(method = "pearson") - fig.write_html("SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_corr_matrix.html") + fig.write_html("/project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_corr_matrix.html") .. raw:: html - :file: SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_corr_matrix.html + :file: /project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_corr_matrix.html You can also use the parameter focus to only compute a correlation vector. @@ -887,10 +890,10 @@ def corr( :suppress: fig = data.corr(method = "pearson", focus = "score1") - fig.write_html("SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_corr_vector.html") + fig.write_html("/project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_corr_vector.html") .. raw:: html - :file: SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_corr_vector.html + :file: /project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_corr_vector.html It is less expensive and it allows you to focus your search on one specific column. @@ -912,6 +915,7 @@ def corr( "mround": mround, "show": show, "chart": chart, + "with_numbers": with_numbers, **style_kwargs, } if focus: @@ -1254,10 +1258,10 @@ def cov( } ) fig = data.cov() - fig.write_html("SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_cov_matrix.html") + fig.write_html("/project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_cov_matrix.html") .. raw:: html - :file: SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_cov_matrix.html + :file: /project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_cov_matrix.html You can also use the parameter focus to only compute a covariance vector. @@ -1269,10 +1273,10 @@ def cov( :suppress: fig = data.cov(method = "pearson", focus = "score1") - fig.write_html("SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_cov_vector.html") + fig.write_html("/project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_cov_vector.html") .. raw:: html - :file: SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_cov_vector.html + :file: /project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_cov_vector.html It is less expensive and it allows you to focus your search on one specific column. @@ -1432,10 +1436,10 @@ def regr( } ) fig = data.regr(method = "beta") - fig.write_html("SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_regr_beta_matrix.html") + fig.write_html("/project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_regr_beta_matrix.html") .. raw:: html - :file: SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_regr_beta_matrix.html + :file: /project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_regr_beta_matrix.html Draw the regression matrix using the Alpha coefficient. @@ -1459,10 +1463,10 @@ def regr( } ) fig = data.regr(method = "alpha") - fig.write_html("SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_regr_alpha_matrix.html") + fig.write_html("/project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_regr_alpha_matrix.html") .. raw:: html - :file: SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_regr_alpha_matrix.html + :file: /project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_regr_alpha_matrix.html Draw the regression matrix using the R2 correlation coefficient. @@ -1486,10 +1490,10 @@ def regr( } ) fig = data.regr(method = "r2") - fig.write_html("SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_regr_r2_matrix.html") + fig.write_html("/project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_regr_r2_matrix.html") .. raw:: html - :file: SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_regr_r2_matrix.html + :file: /project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_regr_r2_matrix.html For more examples, please look at the :ref:`chart_gallery.corr` page of the :ref:`chart_gallery`. Those ones are related to correlation matrix, but the @@ -1739,7 +1743,7 @@ def acf( data = load_amazon() .. raw:: html - :file: SPHINX_DIRECTORY/figures/datasets_loaders_load_amazon.html + :file: /project/data/VerticaPy/docs/figures/datasets_loaders_load_amazon.html Draw the ACF Plot. @@ -1769,10 +1773,10 @@ def acf( width = 600, height = 400, ) - fig.write_html("SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_acf_plot.html") + fig.write_html("/project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_acf_plot.html") .. raw:: html - :file: SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_acf_plot.html + :file: /project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_acf_plot.html For more examples, please look at the :ref:`chart_gallery.acf` page of the :ref:`chart_gallery`. @@ -1973,7 +1977,7 @@ def pacf( data = load_amazon() .. raw:: html - :file: SPHINX_DIRECTORY/figures/datasets_loaders_load_amazon.html + :file: /project/data/VerticaPy/docs/figures/datasets_loaders_load_amazon.html Draw the PACF Plot. @@ -2003,10 +2007,10 @@ def pacf( width = 600, height = 450, ) - fig.write_html("SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_pacf_plot.html") + fig.write_html("/project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_pacf_plot.html") .. raw:: html - :file: SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_pacf_plot.html + :file: /project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_pacf_plot.html For more examples, please look at the :ref:`chart_gallery.acf` page of the :ref:`chart_gallery`. Those ones are related to ACF plots, but the customization @@ -2167,7 +2171,7 @@ def iv_woe( data = load_titanic() .. raw:: html - :file: SPHINX_DIRECTORY/figures/datasets_loaders_load_titanic.html + :file: /project/data/VerticaPy/docs/figures/datasets_loaders_load_titanic.html Draw the IV Bar chart. @@ -2183,10 +2187,10 @@ def iv_woe( vp.set_option("plotting_lib", "plotly") data = load_titanic() fig = data.iv_woe(y = "survived", nbins = 20) - fig.write_html("SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_iv_woe_plot.html") + fig.write_html("/project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_iv_woe_plot.html") .. raw:: html - :file: SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_iv_woe_plot.html + :file: /project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_iv_woe_plot.html .. hint:: @@ -2277,7 +2281,7 @@ def iv_woe(self, y: str, nbins: int = 10) -> TableSample: data = load_titanic() .. raw:: html - :file: SPHINX_DIRECTORY/figures/datasets_loaders_load_titanic.html + :file: /project/data/VerticaPy/docs/figures/datasets_loaders_load_titanic.html Draw the IV Bar chart. @@ -2290,12 +2294,12 @@ def iv_woe(self, y: str, nbins: int = 10) -> TableSample: from verticapy.datasets import load_titanic data = load_titanic() - html_file = open("SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_iv_woe_table.html", "w") + html_file = open("/project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_iv_woe_table.html", "w") html_file.write(data["age"].iv_woe(y = "survived", nbins = 20)._repr_html_()) html_file.close() .. raw:: html - :file: SPHINX_DIRECTORY/figures/core_vDataFrame_vDFCorr_iv_woe_table.html + :file: /project/data/VerticaPy/docs/figures/core_vDataFrame_vDFCorr_iv_woe_table.html .. hint::