{
  "_id": "6a153b9eacfb0bcc41d52d64",
  "Package": "shapley",
  "Type": "Package",
  "Title": "Weighted Mean SHAP and CI for Robust Feature Assessment in ML\nGrid",
  "Version": "0.7.0",
  "Authors@R": "person(\"E. F. Haghish\",\nrole = c(\"aut\", \"cre\", \"cph\"),\nemail = \"haghish@hotmail.com\")",
  "Description": "This R package introduces Weighted Mean SHapley Additive\nexPlanations (WMSHAP), an innovative method for calculating\nSHAP values for a grid of fine-tuned base-learner machine\nlearning models as well as stacked ensembles, a method not\npreviously available due to the common reliance on single\nbest-performing models. By integrating the weighted mean SHAP\nvalues from individual base-learners comprising the ensemble or\nindividual base-learners in a tuning grid search, the package\nweights SHAP contributions according to each model's\nperformance, assessed by multiple either R squared (for both\nregression and classification models). alternatively, this\nsoftware also offers weighting SHAP values based on the area\nunder the precision-recall curve (AUCPR), the area under the\ncurve (AUC), and F2 measures for binary classifiers. It further\nextends this framework to implement weighted confidence\nintervals for weighted mean SHAP values, offering a more\ncomprehensive and robust feature importance evaluation over a\ngrid of machine learning models, instead of solely computing\nSHAP values for the best model. This methodology is\nparticularly beneficial for addressing the severe class\nimbalance (class rarity) problem by providing a transparent,\ngeneralized measure of feature importance that mitigates the\nrisk of reporting SHAP values for an overfitted or biased model\nand maintains robustness under severe class imbalance, where\nthere is no universal criteria of identifying the absolute best\nmodel. Furthermore, the package implements hypothesis testing\nto ascertain the statistical significance of SHAP values for\nindividual features, as well as comparative significance\ntesting of SHAP contributions between features. Additionally,\nit tackles a critical gap in feature selection literature by\npresenting criteria for the automatic feature selection of the\nmost important features across a grid of models or stacked\nensembles, eliminating the need for arbitrary determination of\nthe number of top features to be extracted. This utility is\ninvaluable for researchers analyzing feature significance,\nparticularly within severely imbalanced outcomes where\nconventional methods fall short. Moreover, it is also expected\nto report democratic feature importance across a grid of\nmodels, resulting in a more comprehensive and generalizable\nfeature selection. The package further implements a novel\nmethod for visualizing SHAP values both at subject level and\nfeature level as well as a plot for feature selection based on\nthe weighted mean SHAP ratios.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "RoxygenNote": "7.3.3",
  "URL": "https://github.com/haghish/shapley",
  "BugReports": "https://github.com/haghish/shapley/issues",
  "Config/pak/sysreqs": "make default-jdk libssl-dev",
  "Repository": "https://haghish.r-universe.dev",
  "Date/Publication": "2026-04-26 20:36:15 UTC",
  "RemoteUrl": "https://github.com/haghish/shapley",
  "RemoteRef": "HEAD",
  "RemoteSha": "2abbd6b19084578edb6e41395cf43950050c3578",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-26 06:14:24 UTC",
    "User": "root"
  },
  "Author": "E. F. Haghish [aut, cre, cph]",
  "Maintainer": "E. F. Haghish <haghish@hotmail.com>",
  "MD5sum": "da438f1d31f0c5b2f14417e6ba19aff6",
  "_user": "haghish",
  "_type": "src",
  "_file": "shapley_0.7.0.tar.gz",
  "_fileid": "9381e4e442c5bafb2d074fe340cf6f7ca06a8b22b4f766315677a5b39ea5dab6",
  "_filesize": 896682,
  "_sha256": "9381e4e442c5bafb2d074fe340cf6f7ca06a8b22b4f766315677a5b39ea5dab6",
  "_created": "2026-05-26T06:14:24.000Z",
  "_published": "2026-05-26T06:20:14.423Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77817909335,
      "time": 167,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7210143462"
    },
    {
      "job": 77817909327,
      "time": 138,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7210136478"
    },
    {
      "job": 77817909354,
      "time": 79,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7210165900"
    },
    {
      "job": 77817909357,
      "time": 95,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7210174549"
    },
    {
      "job": 77817601032,
      "time": 167,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7210105828"
    },
    {
      "job": 77817909332,
      "time": 124,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7210133296"
    },
    {
      "job": 77817909363,
      "time": 112,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7210130905"
    },
    {
      "job": 77817909339,
      "time": 82,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7210124523"
    },
    {
      "job": 77817909398,
      "time": 110,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7210130703"
    }
  ],
  "_buildurl": "https://github.com/r-universe/haghish/actions/runs/26435583486",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/haghish/shapley",
  "_commit": {
    "id": "2abbd6b19084578edb6e41395cf43950050c3578",
    "author": "E. F. Haghish <haghish.e.f@gmail.com>",
    "committer": "E. F. Haghish <haghish.e.f@gmail.com>",
    "message": "Create shapley.domain.compare.test.R\n\n0.7.1\n",
    "time": 1777235775
  },
  "_maintainer": {
    "name": "E. F. Haghish",
    "email": "haghish@hotmail.com"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "ggplot2",
      "version": ">= 3.4.2",
      "role": "Imports"
    },
    {
      "package": "h2o",
      "version": ">= 3.34.0.0",
      "role": "Imports"
    },
    {
      "package": "curl",
      "version": ">= 4.3.0",
      "role": "Imports"
    },
    {
      "package": "pander",
      "version": ">= 0.6.5",
      "role": "Imports"
    }
  ],
  "_owner": "haghish",
  "_selfowned": true,
  "_usedby": 1,
  "_updates": [
    {
      "week": "2025-48",
      "n": 13
    },
    {
      "week": "2026-05",
      "n": 3
    },
    {
      "week": "2026-06",
      "n": 8
    },
    {
      "week": "2026-07",
      "n": 44
    },
    {
      "week": "2026-08",
      "n": 6
    },
    {
      "week": "2026-10",
      "n": 1
    },
    {
      "week": "2026-17",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "0.6.0",
      "date": "2026-02-12"
    },
    {
      "name": "0.6.1",
      "date": "2026-02-12"
    },
    {
      "name": "0.7.0",
      "date": "2026-03-04"
    }
  ],
  "_topics": [
    "class-imbalance",
    "class-imbalance-problem",
    "feature-extraction",
    "feature-importance",
    "feature-selection",
    "machine-learning",
    "machine-learning-algorithms",
    "shap",
    "shap-analysis",
    "shap-values",
    "shapely",
    "shapley-additive-explanations",
    "shapley-decomposition",
    "shapley-value",
    "shapley-values",
    "shapleyvalue",
    "weighted-shap",
    "weighted-shap-confidence-interval",
    "weighted-shapley",
    "weighted-shapley-ci"
  ],
  "_stars": 18,
  "_contributors": [
    {
      "user": "haghish",
      "count": 254,
      "uuid": 7235860
    }
  ],
  "_userbio": {
    "uuid": 7235860,
    "type": "user",
    "name": "E. F. Haghish"
  },
  "_downloads": {
    "count": 578,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/shapley"
  },
  "_devurl": "https://github.com/haghish/shapley",
  "_searchresults": 27,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/readme.html",
    "extra/readme.md",
    "extra/shapley.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/haghish/shapley",
  "_realowner": "haghish",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1",
      "date": "2023-11-07"
    },
    {
      "version": "0.3",
      "date": "2024-05-30"
    },
    {
      "version": "0.4",
      "date": "2024-10-23"
    },
    {
      "version": "0.5",
      "date": "2025-03-22"
    },
    {
      "version": "0.5.1",
      "date": "2025-09-18"
    },
    {
      "version": "0.6.0",
      "date": "2026-02-16"
    },
    {
      "version": "0.7.0",
      "date": "2026-03-04"
    }
  ],
  "_exports": [
    "h2o.get_ids",
    "shapley",
    "shapley.domain",
    "shapley.domain.test",
    "shapley.feature.test",
    "shapley.plot",
    "shapley.row.plot",
    "shapley.table",
    "shapley.top"
  ],
  "_help": [
    {
      "page": "feature.selection",
      "title": "Select top features by weighted mean SHAP (WMSHAP)",
      "topics": [
        "feature.selection"
      ]
    },
    {
      "page": "feature.test",
      "title": "Weighted permutation test for paired difference of means",
      "topics": [
        "feature.test"
      ]
    },
    {
      "page": "h2o.get_ids",
      "title": "Extract model IDs from H2O AutoML or Grid objects",
      "topics": [
        "h2o.get_ids"
      ]
    },
    {
      "page": "normalize",
      "title": "Normalize a vector based on specified minimum and maximum values",
      "topics": [
        "normalize"
      ]
    },
    {
      "page": "shapley",
      "title": "Weighted Mean SHAP (WMSHAP) and Confidence Interval for Multiple Models (tuning grid, stacked ensemble, etc.)",
      "topics": [
        "shapley"
      ]
    },
    {
      "page": "shapley.domain",
      "title": "Compute and plot weighted mean SHAP contributions at group level (factors or domains)",
      "topics": [
        "shapley.domain"
      ]
    },
    {
      "page": "shapley.domain.test",
      "title": "Weighted permutation test for difference between two domains",
      "topics": [
        "shapley.domain.test"
      ]
    },
    {
      "page": "shapley.feature.test",
      "title": "Weighted permutation test for WMSHAP difference between two features",
      "topics": [
        "shapley.feature.test"
      ]
    },
    {
      "page": "shapley.plot",
      "title": "Plot weighted mean SHAP (WMSHAP) contributions",
      "topics": [
        "shapley.plot"
      ]
    },
    {
      "page": "shapley.row.plot",
      "title": "WMSHAP row-level plot for a single observation (participant or data row)",
      "topics": [
        "shapley.row.plot"
      ]
    },
    {
      "page": "shapley.table",
      "title": "Create WMSHAP Summary Table Based on the Given Criterion",
      "topics": [
        "shapley.table"
      ]
    },
    {
      "page": "shapley.top",
      "title": "Flag and rank features by WMSHAP cutoffs",
      "topics": [
        "shapley.top"
      ]
    }
  ],
  "_readme": "https://github.com/haghish/shapley/raw/HEAD/README.md",
  "_rundeps": [
    "bitops",
    "cli",
    "cpp11",
    "curl",
    "digest",
    "farver",
    "ggplot2",
    "glue",
    "gtable",
    "h2o",
    "isoband",
    "jsonlite",
    "labeling",
    "lifecycle",
    "pander",
    "R6",
    "RColorBrewer",
    "Rcpp",
    "RCurl",
    "rlang",
    "S7",
    "scales",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_score": 5.707825568332232,
  "_indexed": true,
  "_nocasepkg": "shapley",
  "_universes": [
    "haghish"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.7.0",
      "date": "2026-05-26T06:17:00.000Z",
      "distro": "noble",
      "commit": "2abbd6b19084578edb6e41395cf43950050c3578",
      "fileid": "d24060aa7f5df72be44af4b03ada327f8b17bc7cdcfa2970e24f158b28e5331d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/haghish/actions/runs/26435583486"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.7.0",
      "date": "2026-05-26T06:16:33.000Z",
      "distro": "noble",
      "commit": "2abbd6b19084578edb6e41395cf43950050c3578",
      "fileid": "e1a7f36a6b46f31542d032571a13a7498f3464fd49c241f51ade461b0df32997",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/haghish/actions/runs/26435583486"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.7.0",
      "date": "2026-05-26T06:19:01.000Z",
      "commit": "2abbd6b19084578edb6e41395cf43950050c3578",
      "fileid": "586ddd07501256412b17fb11125db81a39ebd16b1f53baa374ebba1883e9cd40",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/haghish/actions/runs/26435583486"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.7.0",
      "date": "2026-05-26T06:19:39.000Z",
      "commit": "2abbd6b19084578edb6e41395cf43950050c3578",
      "fileid": "42b60c37ba7a01caef4453d39509ca61141a164f568cbb091cf0ec042a735993",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/haghish/actions/runs/26435583486"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.7.0",
      "date": "2026-05-26T06:16:43.000Z",
      "commit": "2abbd6b19084578edb6e41395cf43950050c3578",
      "fileid": "d6ef1aeb7eb9b456a58223bbc4904b0d04bcecb59af07def908c6e725efb746f",
      "status": "success",
      "buildurl": "https://github.com/r-universe/haghish/actions/runs/26435583486"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.7.0",
      "date": "2026-05-26T06:15:51.000Z",
      "commit": "2abbd6b19084578edb6e41395cf43950050c3578",
      "fileid": "07124f06e02ad3aa9ee8bee51e07586146163d5e989271a43ee810810fb00340",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/haghish/actions/runs/26435583486"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.7.0",
      "date": "2026-05-26T06:15:31.000Z",
      "commit": "2abbd6b19084578edb6e41395cf43950050c3578",
      "fileid": "4dd2b26768254a32afa2bf42aa0d4baf76663f61d87f5a3d63bf3e7eac0477e1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/haghish/actions/runs/26435583486"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.7.0",
      "date": "2026-05-26T06:16:05.000Z",
      "commit": "2abbd6b19084578edb6e41395cf43950050c3578",
      "fileid": "67dc8d6e9d907565b9a4162c360da0f5b69459752f722633f1f3cb33be23b730",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/haghish/actions/runs/26435583486"
    }
  ]
}