Binclass-tools

Latest version: v1.1.2

Safety actively analyzes 625010 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.1.2

New release

updates:

- fixed plotly requirement in setup.py

1.1.1

Updates:

- **interactive confusion matrix**: from version 1.1.0 the optimal thresholds dataframe returned in the confusion matrix plot will refer to the thresholds that give the best value of the implemented metrics (or the minimal Cost) for the given set of data (instead of the optimal threshold computed with GHOST method).

- **get_ghost_optimal_thresholds_df**: new name of function *get_optimized_thresholds_df*, behaviour remains the same except for parameter *optimize_threshold* for which "ROC" isn't supported anymore (was redundant, use Fscore instead)

- **get_ghost_optimal_threshold**: new name of function *get_optimal_threshold*, behaviour remains the same except for parameter *ThOpt_metrics* for which "ROC" isn't supported anymore (was redundant, use Fscore instead)

- **get_ghost_optimal_cost**: new name of function *get_cost_optimal_threshold*, behaviour remains the same

- **lift_curve_plot**: xaxis range fixed

- bug in interactive confusion matrix fixed

1.0.0

Features multiple new graphic tools:

- **calibration_curve_plot**: returns the calibration curve, also known as reliability diagram: plots the average predicted probability for each bin against the fraction of positive classes using true labels and predicted probabilities, and shows the error for each bin and the
value of the Expected Calibration Error (ECE)

- **calibration_plot_from_models**: allows to visually compare the calibration curves of different models and returns the ECE for each given model

- **cumulative_gain_plot**: shows the percentage of targets reached when considering a chosen percentage of the population with the highest predicted probability of belonging to the target class

- **lift_curve_plot**: shows the effectiveness of the model by computing the ratio between the result obtained with a model and the result that would be obtained by a random classifier

- **response_curve_plot**: plots the percentage of actual target class records per decile, where the first decile is associated with the 10 percent of observation with the highest predicted probability of belonging to the target class.

- **cumulative_response_plot**: plots the percentage of actual target class records per decile cumulatively

New utility function added:

- **get_expected_calibration_error**: returns the ECE for the given model's predicted probabilities, with custom bin parameter

Updates for **every graphical function** :

- From version 1.0.0, the behavior of functions that generate plots has changed: generated plots won't be shown directly when the function is called, the related Figure (Plotly) objects, dictionary-like, will be returned as the first outputs instead.

0.3.0

Release 0.3.0 of package Binclass-tools.

Features a new graphic tool:

- **predicted_proba_density_curve_plot**: (interactive Plotly plot with slider) displays either the kernel density estimation curve (default behavior) or the normal distribution curve of the predicted probabilities, grouped by the relative true class (the type of curve can be chosen with the *curve_type* parameter). For each threshold, the regions that are correctly or incorrectly classified will be visualized with different colors.

Updates:

- **Every graphical function**: added parameter *show_display_modebar* (default True) to choose whether to display the Plotly bar mode or not

- **curve_PR_plot** and **curve_ROC_plot**: small graphical updates

- **confusion_linechart_plot**:
- bug fixed, now *total_amount* returned is None when *amount* parameter is None
- small graphical updates

0.2.4

0.2.4 release of package Binclass-tools.

Updates:

- **setup requirements**: added nbformat >= 4.2.0 to requirements for compatibility with the Plotly library.

- **compatibility** with python versions 3.9 and 3.10

- **curve_PR_plot**: added F-beta score to hover info of the plot.

0.2.2

0.2.2 release of package Binclass-tools.

Features three new graphic tools:

- **curve_ROC_plot**: plots the Receiver Operating Characteristic (ROC) Curve with Plotly and returns the value of the area under the curve.
- **curve_PR_plot**: plots the Precision-Recall (PR) Curve with iso-Fbeta curves (representing all points in the precision-recall space whose F-beta scores are equal) with Plotly. The function allows us to choose the value of the beta parameter and displays ISO curves associated with F-beta score values of 0.2, 0.4, 0.6 and 0.8. Returns, as in the ROC curve case, the value of the area under the curve:
- **predicted_proba_violin_plot**: (interactive Plotly plot with slider) displays, through violin plots, the distribution of the predicted probabilities grouped by the relative true class. For each threshold, it allows to see whether the predicted probability for each data point generates a correct prediction or not.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.