Li‘s 影像组学视频学习笔记(29)-ICC的计算

本笔记来源于B站Up主: 有Li 的影像组学的系列教学视频
本节(29)主要讲解: 用pingouin包进行ICC的计算
 
 
1、ICC的wikipedia定义

In statistics, the intraclass correlation, or the intraclass correlation coefficient (ICC), is a descriptive statistic that can be used when quantitative measurements are made on units that are organized into groups. It describes how strongly units in the same group resemble each other. While it is viewed as a type of correlation, unlike most other correlation measures it operates on data structured as groups, rather than data structured as paired observations.

2、导入包

pip install pingouin # for the first time

import pingouin as pg
import pandas as pd
import numpy as np
import os

3、调取内置数据集

data = pg.read_dataset('icc')
print(data)

数据格式大概是这个样子:
在这里插入图片描述

4、计算ICC

icc = pg.intraclass_corr(data = data, targets = "Wine", raters = "Judge",
                         ratings = "Scores")
print(icc)

输出结果如下:
在这里插入图片描述

5、实战

folderPath = "C:/Users/RONG/Desktop/ICC_calculation/"

data_1 = pd.read_excel(os.path.join(folderPath,"ICC_reader_1.xlsx"))
data_2 = pd.read_excel(os.path.join(folderPath,"ICC_reader_2.xlsx"))

data_1.insert(0,"reader",np.ones(data_1.shape[0]))
data_2.insert(0,"reader",np.ones(data_2.shape[0])*2)

data_1.insert(0,"target",range(data_1.shape[0]))
data_2.insert(0,"target",range(data_2.shape[0]))

data = pd.concat([data_1,data_2]) # make a data frame like the test data 

icc = pg.intraclass_corr(data = data, targets = "target", raters = "reader",ratings = "featureA")
print(icc)

以上 ICC_reader_1.xlsx 及处理后的数据形式为:

在这里插入图片描述

在这里插入图片描述

在影像组学实际应用中,应用for循环进行批量化计算各个feature的ICC值。

作者:北欧森林
链接:https://www.jianshu.com/p/9e79ac76fed6
来源:简书,已获授权转载

RadiomicsWorld.com “影像组学世界”论坛:
影像组学世界/RadiomicsWorld

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值