Package: fairmodels 1.2.1

Jakub Wiśniewski

fairmodels: Flexible Tool for Bias Detection, Visualization, and Mitigation

Measure fairness metrics in one place for many models. Check how big is model's bias towards different races, sex, nationalities etc. Use measures such as Statistical Parity, Equal odds to detect the discrimination against unprivileged groups. Visualize the bias using heatmap, radar plot, biplot, bar chart (and more!). There are various pre-processing and post-processing bias mitigation algorithms implemented. Package also supports calculating fairness metrics for regression models. Find more details in (Wiśniewski, Biecek (2021)) <arxiv:2104.00507>.

Authors:Jakub Wiśniewski [aut, cre], Przemysław Biecek [aut]

fairmodels_1.2.1.tar.gz
fairmodels_1.2.1.zip(r-4.5)fairmodels_1.2.1.zip(r-4.4)fairmodels_1.2.1.zip(r-4.3)
fairmodels_1.2.1.tgz(r-4.4-any)fairmodels_1.2.1.tgz(r-4.3-any)
fairmodels_1.2.1.tar.gz(r-4.5-noble)fairmodels_1.2.1.tar.gz(r-4.4-noble)
fairmodels_1.2.1.tgz(r-4.4-emscripten)fairmodels_1.2.1.tgz(r-4.3-emscripten)
fairmodels.pdf |fairmodels.html
fairmodels/json (API)
NEWS

# Install 'fairmodels' in R:
install.packages('fairmodels', repos = c('https://modeloriented.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/modeloriented/fairmodels/issues

Datasets:

On CRAN:

explain-classifiersexplainable-mlfairnessfairness-comparisonfairness-mlmodel-evaluation

7.59 score 86 stars 1 packages 50 scripts 384 downloads 25 exports 37 dependencies

Last updated 2 years agofrom:ed28759990. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 10 2024
R-4.5-winNOTENov 10 2024
R-4.5-linuxNOTENov 10 2024
R-4.4-winNOTENov 10 2024
R-4.4-macNOTENov 10 2024
R-4.3-winOKNov 10 2024
R-4.3-macOKNov 10 2024

Exports:all_cutoffscalculate_group_fairness_metricsceteris_paribus_cutoffchoose_metricconfusion_matrixdisparate_impact_removerexpand_fairness_objectfairness_checkfairness_check_regressionfairness_heatmapfairness_pcafairness_radargroup_matricesgroup_metricgroup_model_performancemetric_scoresperformance_and_fairnessplot_densityplot_fairmodelspre_process_dataregression_metricsresamplereweightroc_pivotstack_metrics

Dependencies:clicodetoolscolorspaceDALEXfansifarverforeachggplot2gluegridExtragtableiBreakDowningredientsisobanditeratorskernelshaplabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepatchworkpillarpkgconfigR6RColorBrewerrlangscalestibbleutf8vctrsviridisLitewithr

Advanced Tutorial

Rendered fromAdvanced_tutorial.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2021-10-08
Started: 2020-07-21

Basic Tutorial

Rendered fromBasic_tutorial.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2021-10-08
Started: 2020-05-15

Readme and manuals

Help Manual

Help pageTopics
Adult datasetadult
Adult test datasetadult_test
All cutoffsall_cutoffs
Calculate fairness metrics in groupscalculate_group_fairness_metrics
Ceteris paribus cutoffceteris_paribus_cutoff
Choose metricchoose_metric
Modified COMPAS datasetcompas
Confusion matrixconfusion_matrix
Disparate impact removerdisparate_impact_remover
Expand Fairness Objectexpand_fairness_object
Fairness checkfairness_check
Fairness check regressionfairness_check_regression
Fairness heatmapfairness_heatmap
Fairness PCAfairness_pca
Fairness radarfairness_radar
Modified German Credit data datasetgerman
Group confusion matricesgroup_matrices
Group metricgroup_metric
Group model performancegroup_model_performance
Metric scoresmetric_scores
Performance and fairnessperformance_and_fairness
Plot fairness objectplot_density
Plot fairmodelsplot_fairmodels plot_fairmodels.default plot_fairmodels.explainer plot_fairmodels.fairness_object
Plot all cutoffsplot.all_cutoffs
Ceteris paribus cutoff plotplot.ceteris_paribus_cutoff
Plot chosen metricplot.chosen_metric
Plot Heatmapplot.fairness_heatmap
Plot fairness objectplot.fairness_object
Plot fairness PCAplot.fairness_pca
Plot fairness radarplot.fairness_radar
Plot fairness regression objectplot.fairness_regression_object
Plot group metricplot.group_metric
Plot metric scoresplot.metric_scores
Plot fairness and performanceplot.performance_and_fairness
Plot stacked Metricsplot.stacked_metrics
Pre-process datapre_process_data
Print all cutoffsprint.all_cutoffs
Print ceteris paribus cutoffprint.ceteris_paribus_cutoff
Print chosen metricprint.chosen_metric
Print fairness heatmapprint.fairness_heatmap
Print Fairness Objectprint.fairness_object
Print fairness PCAprint.fairness_pca
Print fairness radarprint.fairness_radar
Print Fairness Regression Objectprint.fairness_regression_object
Print group metricprint.group_metric
Print metric scores dataprint.metric_scores
Print performance and fairnessprint.performance_and_fairness
Print stacked metricsprint.stacked_metrics
Regression metricsregression_metrics
Resampleresample
Reweightreweight
Reject Option based Classification pivotroc_pivot
Stack metricsstack_metrics