lime 模型_使用LIME的糖尿病预测模型解释— OneZeroBlog

lime 模型

Article outline

文章大纲

  • Introduction

    介绍
  • Data Background

    资料背景
  • Aim of the article

    本文的目的
  • Exploratory analysis

    探索性分析
  • Training a Random Forest Model

    训练随机森林模型
  • Global Importance

    全球重要性
  • Local Importance

    当地重要性

介绍 (Introduction)

In the supervised machine learning world, there are two types of algorithmic task often performed. One is called regression (predicting continuous values) and the other is called classification (predicting discrete values). Black box algorithms such as SVM, random forest, boosted trees, neural networks provide better prediction accuracy than conventional algorithms. The problem starts when we want to understand the impact (magnitude and direction) of different variables. In this article, I have presented an example of Random Forest binary classification algorithm and its interpretation at the global and local level using Local Interpretable Model-agnostic Explanations (LIME).

在有监督的机器学习世界中,经常执行两种类型的算法任务。 一种称为回归(预测连续值),另一种称为分类(预测离散值)。 与传统算法相比,诸如SVM,随机森林,增强树,神经网络之类的黑匣子算法提供了更好的预测精度。 当我们想了解不同变量的影响(大小和方向)时,问题就开始了。 在本文中,我提供了一个使用本地可解释模型不可知解释(LIME)在全球和本地级别进行随机森林二进制分类算法及其解释的示例。

资料背景 (Data Background)

In this example, we are going to use the Pima Indian Diabetes 2 data set obtained from the UCI Repository of machine learning databases (Newman et al. 1998).

在本示例中,我们将使用从机器学习数据库的UCI存储库中获得的Pima Indian Diabetes 2数据集( Newman等,1998 )。

This data set is originally from the National Institute of Diabetes and Digestive and Kidney Diseases. The objective of the data set is to diagnostically predict whether or not a patient has diabetes, based on certain diagnostic measurements included in the data set. Several constraints were placed on the selection of these instances from a larger database. In particular, all patients here are females at least 21 years old of Pima Indian heritage.

该数据集最初来自美国国立糖尿病与消化与肾脏疾病研究所。 数据集的目的是根据数据集中包含的某些诊断测量值来诊断性预测患者是否患有糖尿病。 从较大的数据库中选择这些实例受到一些限制。 特别是,这里的所有患者均为皮马印第安人血统至少21岁的女性。

The Pima Indian Diabetes 2 data set is the refined version (all missing values were assigned as NA) of the Pima Indian diabetes data. The data set contains the following independent and dependent variables.

Pima印度糖尿病2数据集是Pima印度糖尿病数据的精炼版本(所有缺失值均指定为NA)。 数据集包含以下独立变量和因变量。

Independent variables (symbol: I)

自变量(符号:I)

  • I1: pregnant: Number of times pregnant

    I1: 怀孕 :怀孕次数

  • I2: glucose: Plasma glucose concentration (glucose tolerance test)

    I2: 葡萄糖 :血浆葡萄糖浓度(葡萄糖耐量试验)

  • I3: pressure: Diastolic blood pressure (mm Hg)

    I3: 压力 :舒张压(毫米汞柱)

  • I4: triceps: Triceps skin fold thickness (mm)

    I4: 三头肌 :三头肌的皮肤折叠厚度(毫米)

  • I5: insulin: 2-Hour serum insulin (mu U/ml)

    I5: 胰岛素 :2小时血清胰岛素(mu U / ml)

  • I6: mass: Body mass index (weight in kg/(height in m)\²)

    I6: 质量 :体重指数(重量,单位:kg /(身高,单位:m)\²)

  • I7: pedigree: Diabetes pedigree function

    I7: 谱系 :糖尿病谱系功能

  • I8: age: Age (years)

    I8: 年龄 :年龄(年)

Dependent Variable (symbol: D)

因变量(符号:D)

  • D1: diabetes: diabetes case (pos/neg)

    D1: 糖尿病 :糖尿病病例(正/负)

建模目的 (Aim of the Modelling)

  • fitting a random forest ensemble binary classification model that accurately predicts whether or not the patients in the data set have diabetes

    拟合随机森林综合二元分类模型,该模型可准确预测数据集中的患者是否患有糖尿病
  • understanding the global influence of variables on diabetes prediction

    了解变量对糖尿病预测的全球影响
  • understanding the influence of variables on the local level for the individual patient

    了解变量对个体患者局部水平的影响

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值