Python 第三方模块 机器学习 Scikit-Learn模块 数据降维

一.feature_extraction
1.简介:

该模块用于对原始数据进行"特征提取"(feature extraction)

2.使用:

"特征值映射列表"(lists of feature-value mappings)转换为矢量:class sklearn.feature_extraction.DictVectorizer([dtype<class 'numpy.float64'>,separator='=',sparse=True,sort=True])
实现"特征哈希"(feature hashing)/"哈希技巧"(hashing trick):class sklearn.feature_extraction.FeatureHasher([n_features=1048576,input_type='dict',dtype=<class 'numpy.float64'>,alternate_sign=True])

3.feature_extraction.image
(1)简介:

该子模块用于从图像中提取特征

(2)函数:

2维图像转换为"补丁集合"(collection of patches):[<patches>=]sklearn.feature_extraction.image.extract_patches_2d(<image>,<patch_size>[,max_patches=None,random_state=None])
获取"像素连接图"(Graph of the pixel-to-pixel connections):sklearn.feature_extraction.image.grid_to_graph(<n_x>,<n_y>[,n_z=1,mask=None,return_as=<class 'scipy.sparse.coo.coo_matrix'>,dtype=<class 'int'>])
获取"像素梯度连接图"(Graph of the pixel-to-pixel gradient connections):sklearn.feature_extraction.image.img_to_graph(<img>[,mask=None,return_as=<class 'scipy.sparse.coo.coo_matrix'>,dtype=None])
通过图像的全部补丁重建图像:[<image>=]sklearn.feature_extraction.image.reconstruct_from_patches_2d(<patches>,<image_size>)

(3)类:

从图像集合中提取补丁:class sklearn.feature_extraction.image.PatchExtractor([patch_size
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值