How to use the forestci.calibration function in forestci

To help you get started, we’ve selected a few forestci examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uw-cmg / MAST-ML / mastml / plot_helper.py View on Github external
#results_ss = fci.random_forest_error(new_forest, X_train, X_test,
        #                                 calibrate=False,
        #                                 memory_constrained=memory_constrained,
        #                                 memory_limit=memory_limit)
        results_ss = random_forest_error_modified(new_forest, is_ensemble, X_train, X_test,
                                         calibrate=False,
                                         memory_constrained=memory_constrained,
                                         memory_limit=memory_limit)
        # Use this second set of variance estimates
        # to estimate scale of Monte Carlo noise
        sigma2_ss = np.mean((results_ss - V_IJ_unbiased)**2)
        delta = n_sample / n_trees
        sigma2 = (delta**2 + (1 - delta)**2) / (2 * (1 - delta)**2) * sigma2_ss

        # Use Monte Carlo noise scale estimate for empirical Bayes calibration
        V_IJ_calibrated = fci.calibration.calibrateEB(V_IJ_unbiased, sigma2)

        return V_IJ_calibrated

forestci

forestci: confidence intervals for scikit-learn forest algorithms

MIT
Latest version published 6 months ago

Package Health Score

68 / 100
Full package analysis