Kernel principal component analysis in scikit-learn
来源:互联网 发布:梦里花落知多少句子 编辑:程序博客网 时间:2024/04/30 20:57
For our convenience, scikit-learn implements a kernel PCA class in the sklearn.decompositionsubmodule. The usage is similar to the standard PCA class, and we can specify the kernel via thekernel parameter .
from sklearn.decomposition import KernelPCAX, y = make_moons(n_samples=100, random_state=123)scikit_kpca = KernelPCA(n_components=2, kernel='rbf', gamma=15)X_skernpca = scikit_kpca.fit_transform(X)
Plot the transformed half-moon shape data onto the frst two principal components
plt.scatter(X_skernpca[y == 0, 0], X_skernpca[y == 0, 1], color='red', marker='^', alpha=0.5)plt.scatter(X_skernpca[y == 1, 0], X_skernpca[y == 1, 1], color='blue', marker='o', alpha=0.5)plt.xlabel('PC1')plt.ylabel('PC2')plt.show()
Reference:《Python Machine Learning》
0 0
- Kernel principal component analysis in scikit-learn
- Principal component analysis in Matlab
- Using kernel principal component analysis for nonlinear mappings
- Principal Component Analysis
- Principal component analysis
- Principal Component Analysis
- Principal Component Analysis
- Principal component analysis
- Principal Component Analysis
- Principal Component Analysis(PCA)
- PCA-principal component analysis
- Principal Component Analysis(PCA)
- PLA(principal component analysis ) 参考资料
- PCA(principal component analysis)
- PCA(Principal Component Analysis)
- 解释一下核主成分分析(Kernel Principal Component Analysis, KPCA)的公式推导过程~
- 解释一下核主成分分析(Kernel Principal Component Analysis, KPCA)的公式推导过程~
- General Remote Sensing Principal Component Analysis/ Transformations
- 203. Remove Linked List Elements
- Ansible(14)wait_for模块
- linux下的svn操作
- 导航栏及导航按钮(三明治按钮)
- kafka简介
- Kernel principal component analysis in scikit-learn
- 图书馆管理系统做现代化结构分析
- 游戏体验感受
- A Survey of Appearance Models in Visual Object Tracking 阅读笔记(二)
- 移动路线
- 4种方法让SpringMVC接收多个对象
- python的库函数安装
- 实现Comparator方式排序一TreeSet集合
- 关于HttpClientPost的具体用法