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

Bug: disabling progress when running fit() fails #70

Closed
carsonwoods opened this issue Nov 2, 2022 · 1 comment
Closed

Bug: disabling progress when running fit() fails #70

carsonwoods opened this issue Nov 2, 2022 · 1 comment

Comments

@carsonwoods
Copy link

carsonwoods commented Nov 2, 2022

The fit() function takes a progress parameter (with a default value of False). I assume this is supposed to disable the fitting progress bar/reporting. This doesn't work and upon looking at the function (listed below), it doesn't seem to be used anywhere within the function. It looks like this bug was introduced in PR #64.

def fit(self, progress=False, n_jobs=-1, max_workers=-1):
        r"""Loop over distributions and find best parameter to fit the data for each
        When a distribution is fitted onto the data, we populate a set of
        dataframes:
            - :attr:`df_errors`  :sum of the square errors between the data and the fitted
              distribution i.e., :math:`\sum_i \left( Y_i - pdf(X_i) \right)^2`
            - :attr:`fitted_param` : the parameters that best fit the data
            - :attr:`fitted_pdf` : the PDF generated with the parameters that best fit the data
        Indices of the dataframes contains the name of the distribution.
        """
        import warnings

        warnings.filterwarnings("ignore", category=RuntimeWarning)

        N = len(self.distributions)
        with tqdm_joblib(desc=f"Fitting {N} distributions", total=N) as progress_bar:
            Parallel(n_jobs=max_workers, backend='threading')(delayed(self._fit_single_distribution)(dist) for dist in self.distributions)


        self.df_errors = pd.DataFrame(
            {
                "sumsquare_error": self._fitted_errors,
                "aic": self._aic,
                "bic": self._bic,
                "kl_div": self._kldiv,
                "ks_statistic": self._ks_stat,
                "ks_pvalue": self._ks_pval,
            }
        )
@carsonwoods carsonwoods changed the title Bug: disabling progress when running fit() fails Bug: disabling progress when running fit() fails Nov 2, 2022
@cokelaer
Copy link
Owner

cokelaer commented Aug 8, 2023

Fixed in v1.6.0

@cokelaer cokelaer closed this as completed Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants