{"id":24805305,"url":"https://github.com/viadee/localice","last_synced_at":"2025-10-13T06:32:13.901Z","repository":{"id":56936543,"uuid":"164842593","full_name":"viadee/localICE","owner":"viadee","description":"Local Individual Conditional Expectation (localICE) is a local explanation approach from the field of eXplainable Artificial Intelligence (XAI)","archived":false,"fork":false,"pushed_at":"2020-12-19T12:44:39.000Z","size":387,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-10-11T04:14:53.376Z","etag":null,"topics":["ai","explainable-ai","ggplot","machine-learning","r","visualization"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viadee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-09T10:36:48.000Z","updated_at":"2020-02-07T23:40:25.000Z","dependencies_parsed_at":"2022-08-21T01:10:27.434Z","dependency_job_id":null,"html_url":"https://github.com/viadee/localICE","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/viadee/localICE","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viadee%2FlocalICE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viadee%2FlocalICE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viadee%2FlocalICE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viadee%2FlocalICE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viadee","download_url":"https://codeload.github.com/viadee/localICE/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viadee%2FlocalICE/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013969,"owners_count":26085429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","explainable-ai","ggplot","machine-learning","r","visualization"],"created_at":"2025-01-30T07:18:01.993Z","updated_at":"2025-10-13T06:32:13.626Z","avatar_url":"https://github.com/viadee.png","language":"R","readme":"[![CRAN Status Badge](http://www.r-pkg.org/badges/version/localICE)](https://CRAN.R-project.org/package=localICE)\n[![GitHub Status Badge](https://img.shields.io/badge/GitHub-0.1.1-green.svg)](https://github.com/viadee/localICE)\n[![Build Status](https://travis-ci.com/viadee/localICE.svg?branch=master)](https://travis-ci.com/viadee/localICE)\n[![codecov](https://codecov.io/gh/viadee/localICE/branch/master/graph/badge.svg)](https://codecov.io/gh/viadee/localICE)\n[![CRAN Downloads](http://cranlogs.r-pkg.org/badges/grand-total/localICE?color=brightgreen\n)](https://CRAN.R-project.org/package=localICE)\n[![](https://cranlogs.r-pkg.org/badges/localICE)](https://cran.r-project.org/package=localICE)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n# localICE\n*Local Individual Conditional Expectation (localICE)* is a local explanation approach from the field of *eXplainable Artificial Intelligence (XAI)*. This is the repository of the ```R```-package ```localICE```.\n\n# Introduction\n### Idea\nlocalICE is a model-agnostic XAI approach which provides three-dimensional local explanations for particular data instances. The approach is proposed in the master thesis of Martin Walter as an extension to ICE (see Reference). The three dimensions are the two features at the horizontal and vertical axes as well as the target represented by different colors. The approach is applicable for classification and regression problems to explain interactions of two features towards the target. For classification models, the number of classes can be more than two and each class is added as a different color to the plot. The given instance is added to the plot as two dotted lines according to the feature values. The ```localICE```-package can explain features of type ```factor``` and ```numeric``` of any machine learning model. Automatically supported machine learning packages are ```mlr```, ```randomForest```, ```caret``` or all other with an ```S3``` predict function. For further model types from other packages, a predict function has to be provided as an argument in order to get access to the model, as described below by means of an example with the ```h2o``` library. \n### Reference\nAlex Goldstein et al. *“Peeking Inside the Black Box: Visualizing Statistical Learning With Plots of Individual Conditional Expectation”*. In: *Journal of Computational and Graphical Statistics* 24.1 (2013), pp. 44–65. URL: http://arxiv.org/abs/1309.6392 \n\n# Examples\n### Regression\n\n![regression]\n\n### Classification\n![classification]\n\n### Using ```localICE``` with any machine learning library, in this case with ```h2o```:\n```splus\nif(require(\"h2o\") \u0026\u0026 require(\"mlbench\")){\n  h2o.init()\n\n  # Wrapping the h2o predict function and data type:\n  predict.fun = function(model,newdata){\n    prediction = h2o.predict(model, as.h2o(newdata))\n    prediction = as.data.frame(prediction)\n    return(prediction$predict)\n  }\n\n  # Get data and train a random forest\n  data(\"PimaIndiansDiabetes\")\n  rf = h2o.randomForest(y = \"glucose\", training_frame = as.h2o(PimaIndiansDiabetes))\n\n  # Get explanation\n  explanation = localICE(\n    instance = PimaIndiansDiabetes[1, ],\n    data = PimaIndiansDiabetes,\n    feature_1 = \"age\",\n    feature_2 = \"diabetes\",\n    target = \"glucose\",\n    model = rf,\n    regression = TRUE,\n    predict.fun = predict.fun,\n    step_1 = 5\n  )\n  plot(explanation)\n  h2o.shutdown(prompt = FALSE)\n}\n```\n# Installation\nFor official version, install via CRAN:\n```splus\ninstall.packages(\"localICE\")\nrequire(\"localICE\")\nhelp(\"localICE\")\n```\nFor developmental version, install via GitHub:\n```splus\nif(require(\"devtools\")){\n  install_github(\"viadee/localICE\")  \n}\n```\n# License\nBSD 3-Clause License\n\n# Authors\n[Martin Walter](https://github.com/aiwalter) - *Initial work*\n\n\n[regression]: \nhttps://github.com/viadee/localICE/blob/master/images/regression.png\n\"Regression\"\n\n[classification]: \nhttps://github.com/viadee/localICE/blob/master/images/classification.png\n\"Classification\"\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviadee%2Flocalice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviadee%2Flocalice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviadee%2Flocalice/lists"}