Recent Releases of empulse

empulse - 0.9.0

  • Feature Added optimal_threshold and optimal_rate methods to calculate the optimal threshold(s) and optimal predicted positive rate for a given metric. This is useful for determining the best decision threshold and predicted positive rate for a cost-sensitive or value-driven model.
  • Feature CSTreeClassifier, CSForestClassifier, andCSBaggingClassifier can now take a Metric instance as their criterion to optimize.
  • Feature CSThresholdClassifier can now take a Metric instance to choose the optimal decision threshold.
  • Feature RobustCSClassifier can now take estimators with aMetric instance as the loss function or criterion.RobustCSClassifier will treat any cost marked as outlier sensitive. This can be done by using the mark_outlier_sensitive method.
  • Feature Allow savings metrics to be used in CSBoostClassifier andCSLogitClassifier as the objective function. Internally, the expected cost loss is used to train the model, since the expected savings score is just a transformation of the expected cost loss.
  • API Change kind argument to Metric has been replaced by strategy. The Metric class now takes a MetricStrategy instance. This change allows for more flexibility in defining the metric strategy. The currently available strategies are:

    • MaxProfit for the expected maximum profit score
    • Cost for the expected cost loss
    • Savings for the expected savings score
  • Fix Fix error when importing Empulse without any optional dependencies installed.

  • Fix Fix CSLogitClassifier not properly using the gradient when using a custom loss function from Metric.

  • Fix Fix models throwing errors when differently shaped costs are passed to the fit or predict method.

  • Fix Fix sympy distribution parameters not being properly translated to scipy distribution parameters when using the MaxProfit strategy (formerly kind='max profit') with the quasi monte-carlo integration method.

- Python
Published by github-actions[bot] 12 months ago

empulse - 0.8.0

  • Feature: CSBoostClassifier, CSLogitClassifier, and ProfLogitClassifier can now take a ,Metric, instance as their loss function. Internally, the metric instance is converted to the appropriate loss function for the model. For more information, read the User Guide.
  • Feature: Type hints are now available for all functions and classes.
  • Enhancement: Add support for more than one stochastic variable when building maximum profit metrics with Metric
  • Enhancement: Allow Metric to be used as a context manager. This ensures the metric is always built after defining the cost-benefit elements.
  • Fix: Fix datasets not properly being packaged together with the package
  • Fix: Fix RobustCSClassifier when array-like parameters are passed to fit method.
  • Fix: Fix boosting models being biased towards the positive class.

Full Changelog: https://github.com/ShimantoRahman/empulse/compare/0.7.0...0.8.0

- Python
Published by github-actions[bot] about 1 year ago

empulse - 0.7.0

Full Changelog: https://github.com/ShimantoRahman/empulse/compare/0.6.0...0.7.0

  • MajorFeature: Add empulse.models.CSTreeClassifier, empulse.models.CSForestClassifier, and empulse.models.CSBaggingClassifier to support cost-sensitive decision tree and ensemble models
  • Enhancement: Add support for scikit-learn 1.5.2 (previously Empulse only supported scikit-learn 1.6.0 and above).
  • API: Removed the emp_score and emp functions from the empulse.metrics module. Use the empulse.metrics.Metric class instead to define custom expected maximum profit measures. For more information, read the User Guide.
  • API: Removed numba as a dependency for Empulse. This will reduce the installation time and the size of the package.
  • Fix: Fix empulse.metrics.Metric when defining stochastic variable with fixed values.
  • Fix: Fix empulse.metrics.Metric when stochastic variable has infinite bounds.
  • Fix: Fix empulse.models.CSThresholdClassifier when costs of predicting positive and negative classes are equal.
  • Fix: Fix documentation linking issues to sklearn

- Python
Published by github-actions[bot] over 1 year ago

empulse - 0.6.0

  • Add Metric class to easily build your own value-driven and cost-sensitive metrics
  • Add support for LightGBM and Catboost models in CSBoostClassifier and B2BoostClassifier
  • make_objective_churn and make_objective_acquisition now take a model argument to calculate the objective for either XGBoost, LightGBM or Catboost models.
  • XGBoost is now an optional dependency together with LightGBM and Catboost. To install the package with XGBoost, LightGBM and Catboost support, use the following command: pip install empulse[optional]
  • Renamed y_pred_baseline and y_proba_baseline to baseline in savings_score and expected_savings_score. It now accepts the following arguments:

    • If 'zero_one', the baseline model is a naive model that predicts all zeros or all ones depending on which is better.
    • If 'prior', the baseline model is a model that predicts the prior probability of the majority or minority class depending on which is better (not available for savings score).
    • If array-like, target probabilities of the baseline model.
  • Add parameter validation for all models and samplers

  • Make all arguments of dataset loaders keyword-only

  • Update the descriptions attached to each dataset to match information found in the user guide

  • Improve type hints for functions and classes

Full Changelog: https://github.com/ShimantoRahman/empulse/compare/0.5.2...0.6.0

- Python
Published by github-actions[bot] over 1 year ago

empulse - 0.5.2

  • Allow savingsscore and expectedsavingsscore to calculate the savings score over the baseline model instead of a naive model, by setting the ypredbaseline and yproba_baseline parameters, respectively.
  • Reworked the user guide documentation to better explain the usage of value-driven and cost-sensitive models, samplers and metrics
  • CSLogitClassifier and ProfLogitClassifier by default do not perform soft-thresholding on the regression coefficients. This can be enabled by setting the soft_threshold parameter to True.
  • Prevent division by zero errors in expectedcostloss

Full Changelog: https://github.com/ShimantoRahman/empulse/compare/0.5.1...0.5.2

- Python
Published by github-actions[bot] over 1 year ago

empulse - 0.5.1

  • Fix documentation build issue

Full Changelog: https://github.com/ShimantoRahman/empulse/compare/0.5.0...0.5.1

- Python
Published by github-actions[bot] over 1 year ago

empulse - 0.5.0

  • Added supported for python 3.13
  • Added cost-sensitive models
    • CSLogitClassifier
    • CSBoostClassifier
    • RobustCSClassifier
    • CSThresholdClassifier
  • Added cost-sensitive metrics
    • cost_loss
    • expectedcostloss
    • expectedlogcost_loss
    • savings_score
    • expectedsavingsscore
  • Added cost-sensitive sampler
    • CostSensitiveSampler
  • Added datasets module
  • rename metric arguments which expect target score from ypred to yscore and target probabilities from ypred to yproba.
  • Allow all cost-sensitive models and samplers to accept cost parameters during initialization

Full Changelog: https://github.com/ShimantoRahman/empulse/compare/0.4.6...0.5.0

- Python
Published by github-actions[bot] over 1 year ago

empulse - 0.4.6

Full Changelog: https://github.com/ShimantoRahman/empulse/compare/0.4.0...0.4.6

- Python
Published by github-actions[bot] over 1 year ago

empulse - Empulse 0.4.0

Added the Area Under the Expected Profit Curve metric.

- Python
Published by ShimantoRahman over 1 year ago

empulse - Empulse 0.3.1

- Python
Published by ShimantoRahman about 2 years ago