相关分析
来源:互联网 发布:紫薇圣人 知乎 编辑:程序博客网 时间:2024/06/02 10:02
假设检验
分布检验
位置检验
弥散试验
Ansari-Bradley
Bartlett’s test
其中,第
方差分析
方差分析(ANOVA)是从观测变量的方差入手,研究诸多控制变量中哪些变量是对观测变量有显著影响的变量。
数据降维
特征变换技术通过将数据变换到新的特征来降低数据的维数。
因子分析(Factor analysis)
在Matlab中可使用factoran来进行因子分析。
回归算法
岭回归
经典的线性相关分析方法难以有效探测数据的内丰结构与规律,基于互信息的度量准则,由于其具有能够有效刻画非线性相关系数的优势,而日益受到重视。
相应的python例程1:
import numpy as npfrom minepy import MINEdef print_stats(mine): print "MIC", mine.mic()x = np.linspace(0, 1, 1000)y = np.sin(10 * np.pi * x) + xmine = MINE(alpha=0.6, c=15)mine.compute_score(x, y)print "Without noise:"print_stats(mine)printnp.random.seed(0)y +=np.random.uniform(-1, 1, x.shape[0]) # add some noisemine.compute_score(x, y)print "With noise:"print_stats(mine)
python例程2:
from __future__ import divisionimport numpy as npimport matplotlib.pyplot as pltfrom minepy import MINEdef mysubplot(x, y, numRows, numCols, plotNum, xlim=(-4, 4), ylim=(-4, 4)): r = np.around(np.corrcoef(x, y)[0, 1], 1) mine = MINE(alpha=0.6, c=15) mine.compute_score(x, y) mic = np.around(mine.mic(), 1) ax = plt.subplot(numRows, numCols, plotNum, xlim=xlim, ylim=ylim) ax.set_title('Pearson r=%.1f\nMIC=%.1f' % (r, mic),fontsize=10) ax.set_frame_on(False) ax.axes.get_xaxis().set_visible(False) ax.axes.get_yaxis().set_visible(False) ax.plot(x, y, ',') ax.set_xticks([]) ax.set_yticks([]) return axdef rotation(xy, t): return np.dot(xy, [[np.cos(t), -np.sin(t)], [np.sin(t), np.cos(t)]])def mvnormal(n=1000): cors = [1.0, 0.8, 0.4, 0.0, -0.4, -0.8, -1.0] for i, cor in enumerate(cors): cov = [[1, cor],[cor, 1]] xy = np.random.multivariate_normal([0, 0], cov, n) mysubplot(xy[:, 0], xy[:, 1], 3, 7, i+1)def rotnormal(n=1000): ts = [0, np.pi/12, np.pi/6, np.pi/4, np.pi/2-np.pi/6, np.pi/2-np.pi/12, np.pi/2] cov = [[1, 1],[1, 1]] xy = np.random.multivariate_normal([0, 0], cov, n) for i, t in enumerate(ts): xy_r = rotation(xy, t) mysubplot(xy_r[:, 0], xy_r[:, 1], 3, 7, i+8)def others(n=1000): x = np.random.uniform(-1, 1, n) y = 4*(x**2-0.5)**2 + np.random.uniform(-1, 1, n)/3 mysubplot(x, y, 3, 7, 15, (-1, 1), (-1/3, 1+1/3)) y = np.random.uniform(-1, 1, n) xy = np.concatenate((x.reshape(-1, 1), y.reshape(-1, 1)), axis=1) xy = rotation(xy, -np.pi/8) lim = np.sqrt(2+np.sqrt(2)) / np.sqrt(2) mysubplot(xy[:, 0], xy[:, 1], 3, 7, 16, (-lim, lim), (-lim, lim)) xy = rotation(xy, -np.pi/8) lim = np.sqrt(2) mysubplot(xy[:, 0], xy[:, 1], 3, 7, 17, (-lim, lim), (-lim, lim)) y = 2*x**2 + np.random.uniform(-1, 1, n) mysubplot(x, y, 3, 7, 18, (-1, 1), (-1, 3)) y = (x**2 + np.random.uniform(0, 0.5, n)) * \ np.array([-1, 1])[np.random.random_integers(0, 1, size=n)] mysubplot(x, y, 3, 7, 19, (-1.5, 1.5), (-1.5, 1.5)) y = np.cos(x * np.pi) + np.random.uniform(0, 1/8, n) x = np.sin(x * np.pi) + np.random.uniform(0, 1/8, n) mysubplot(x, y, 3, 7, 20, (-1.5, 1.5), (-1.5, 1.5)) xy1 = np.random.multivariate_normal([3, 3], [[1, 0], [0, 1]], int(n/4)) xy2 = np.random.multivariate_normal([-3, 3], [[1, 0], [0, 1]], int(n/4)) xy3 = np.random.multivariate_normal([-3, -3], [[1, 0], [0, 1]], int(n/4)) xy4 = np.random.multivariate_normal([3, -3], [[1, 0], [0, 1]], int(n/4)) xy = np.concatenate((xy1, xy2, xy3, xy4), axis=0) mysubplot(xy[:, 0], xy[:, 1], 3, 7, 21, (-7, 7), (-7, 7))plt.figure(facecolor='white')mvnormal(n=800)rotnormal(n=200)others(n=800)plt.tight_layout()plt.show()
- 相关分析
- 相关分析
- 相关分析
- 相关分析
- 相关分析
- 相关分析
- 典型相关分析相关资料
- 相关分析和回归分析
- 相关分析与回归分析
- BPM相关热点分析
- 中文搜索相关分析
- 相关分析总结
- 语料分析相关概念
- 方差分析与相关分析
- OGRE资源相关分析
- OGRE资源相关分析
- OGRE资源相关分析
- 典型性相关分析
- String作为参数传递 * StringBuffer作为参数传递
- boost库在工作(1) 使用数组智能指针scoped_array
- HDU 1428 漫步校园(BFS+DFS)
- Binary Tree Level Order Traversal II
- PopupWindow的基本使用
- 相关分析
- orbslam2-基础理论(五)ransac
- Java设计模式--装饰模式
- java中通过JDK工具手动压缩JAR包时package路径必须严格对应,否则可能压缩JAR包成功,但执行不了
- 虚函数表解析
- Java猜拳小游戏源代码
- 【English】回归
- WEB开发的会话跟踪方式
- 构造回文串