sklearn实战-乳腺癌细胞数据挖掘(博主亲自录视频)

https://study.163.com/course/introduction.htm?courseId=1005269003&utm_campaign=commission&utm_source=cp-400000000398149&utm_medium=share

医药统计项目联系QQ:231469242

https://github.com/thomas-haslwanter/statsintro_python/tree/master/ISP/Code_Quantlets/08_TestsMeanValues/kruskalWallis

# -*- coding: utf-8 -*-
import numpy as np
# additional packages
from scipy.stats.mstats import kruskalwallis
'''.. currentmodule:: scipy.stats.mstatsThis module contains a large number of statistical functions that canbe used with masked arrays.Most of these functions are similar to those in scipy.stats but mighthave small differences in the API or in the algorithm used. Since thisis a relatively new package, some API changes are still possible.
'''
# Get the data
'''
#These data could be a comparison of the smog levels in four different cities.
city1 = np.array([68, 93, 123, 83, 108, 122])
city2 = np.array([119, 116, 101, 103, 113, 84])
city3 = np.array([70, 68, 54, 73, 81, 68])
city4 = np.array([61, 54, 59, 67, 59, 70])
'''group1=[27,2,4,18,7,9]
group2=[20,8,14,36,21,22]
group3=[34,31,3,23,30,6]
list_groups=[group1,group2,group3]def Kruskawallis_test(list_groups):# Perform the Kruskal-Wallis test,返回True表示有显著差异,返回False表示无显著差异print"Use kruskawallis test:"h, p = kruskalwallis(list_groups)print"H value:",hprint"p",p# Print the resultsif p<0.05:print('There is a significant difference between the cities.')return Trueelse:print('No significant difference between the cities.')return FalseKruskawallis_test(list_groups)    

当样本数据非正态分布,两组数对比时用mann-whitney检验,三组或更多时用kruskal-wallis检验

kruskal-wallis 是一个独立单因素方差检验的版本

kruskal-wallis能用于排序计算

样本数据

流程

H0和H1假设

自由度:组数-1,这里有三组,自由度为3-=2

自由度为2,a=0.05,对应得关键值5.99,如果计算的值大于5.99,拒绝原假设

对数据排序,然后把对应得排序填入表内

计算公式:

T为一组的排序之和

n为一组的个数

计算的H值2.854小于5.99,不拒绝原假设

python风控评分卡建模和风控常识

https://study.163.com/course/introduction.htm?courseId=1005214003&utm_campaign=commission&utm_source=cp-400000000398149&utm_medium=share

Kruskal-Wallis test相关推荐

  1. R语言非独立多分组非参数检验、Kruskal–Wallis检验进行非独立多分组非参数检验(Nonparametric multiple comparisons)、当ANOVA不满足条件的情况下

    R语言非独立多分组非参数检验.Kruskal–Wallis检验进行非独立多分组非参数检验(Nonparametric multiple comparisons).当ANOVA不满足条件的情况下.R语言 ...

  2. Environ. Microbiol. | 土壤pH和温度调节农业生态系统中丰富和稀有细菌群落的构建过程...

    点击蓝字 关注我们 编译:陈春宏   校稿:黄昕瑜 论文ID 原名:Soil pH and temperature regulate assembly processes of abundant an ...

  3. Microbiome:中外合作揭示微生物群落降解复杂微生物聚合物的酶(视频导读)

    培养及非培养宏基因组技术揭示微生物群落降解复杂微生物聚合物的遗传和酶活潜力 Cultivation-independent and cultivation-dependent metagenomes ...

  4. Nature:全球表层土微生物组群落结构和功能

    Structure and function of the global topsoil microbiome 全球表层土微生物组群落结构和功能 Mohammad Bahram, Falk Hilde ...

  5. Nature :全球表层土壤中微生物组的结构和功能

    文章目录 Structure and function of the global topsoil microbiome 全球表层土微生物组群落结构和功能 热心肠日报导读 摘要 正文 **图1. 真菌 ...

  6. 《R语言实战》第7章

    # 第七章 基本统计分析 # 本章内容 # 描述性统计分析 # 频数表和列联表 # 相关系数和协方差 # t检验 # 非参数统计# 7.1 描述性统计分析 # 本节中,我们将关注分析连续型变量的中心趋 ...

  7. 区间比较_表观健康儿童 HLAB27 的参考值区间建立和验证

    作者来自:南京医科大学附属儿童医院 人白细胞抗原 B27(human leukocyte antigen B27,HLA-B27)与强直性脊柱炎(Ankylosing spondylitis,AS)密 ...

  8. 数学狂想曲(五)——概率分布(2), 自相关互相关卷积

    http://antkillerfarm.github.io/ 概率分布(2) 上一篇<概率分布(1)>写的意犹未尽,这里继续写.本篇主要关注χ2\chi^2分布.t分布和F分布,也就是统 ...

  9. 《R Cookbook》中文笔记

    <R Cookbook>中文笔记 目录 @在linux系统中安装R ............................................................ ...

  10. imputation-文献:False signals induced by single-cell imputation(scRNA-seq插补引入的假阳性问题)

    文章题目 False signals induced by single-cell imputation 中文名: 单细胞插补引起的假信号 文章地址: https://f1000research.co ...

最新文章

  1. reportConfig.xml两种数据源连接的配置方式
  2. 删除10亿人脸数据,Meta关闭了Facebook的人脸识别系统
  3. ffplay flv mp4 转_FFmpeg将mp4转成flv
  4. 5 Jedis 操作
  5. 当机械课程设计遇上程序猿2017-12-19
  6. win10雷电3接口驱动_雷电3 ,高速又多用,尽在一个接口
  7. Chapter6 Commodity Forwards
  8. 包含对流环热,热流边界,等温边界的稳态热传导方程的FEM求解。
  9. LVM原理、创建、扩容、缩减、快照详解
  10. Android 端 Rsa加密数据
  11. oracle数据库改语句,Oracle 惯用的修改语句
  12. CLRInjection - 通用托管注入(超级灰色按钮克星升级版)
  13. 什么是轻量应用服务器
  14. Kile 2.1.3 发布,TeX/LaTeX 集成编辑器
  15. C++ 使用Poco库实现日志操作
  16. 数据库服务器文件路径,服务器数据库的文件路径
  17. pageadmin CMS网站制作教程
  18. 前端面试官常问的问题
  19. 如何运用VR3d模型线上展示构建博物馆展厅与展馆
  20. Computing Trajectory Similarity in Linear Time: A Generic Seed-Guided Neural Metric Learning Appr...

热门文章

  1. 【渝粤教育】国家开放大学2018年秋季 1370T教师心理专题 参考试题
  2. 计算机学校迎新条幅,高校另类迎新横幅创意十足大学迎新横幅标语
  3. Ubuntu16.04添加HP Laserjet Pro M128fn打印机和驱动
  4. 计算机维修与维护技术,计算机维修与维护技术探讨论文
  5. Android的so注入( inject)和函数Hook(基于got表) - 支持arm和x86
  6. CSDN 博客周刊怪评榜之“大力丸”
  7. 我的世界怎么用计算机,电脑我的世界怎么用传送,我的世界传送指令大全
  8. 三河一中2021高考成绩如何查询,2021年廊坊高中学校排名及录取分数线排名
  9. MQTT协议版本Mosquitto移植到嵌入式arm平台
  10. 一款魔兽盗号木马分析