Skip to Content
基于Python的无监督学习
book

基于Python的无监督学习

by Ankur A. Patel
January 2021
Intermediate to advanced
384 pages
6h 40m
Chinese
China Electric Power Press Ltd.
Content preview from 基于Python的无监督学习
116
3
3
-
14
:用 t-SNE 分离观察值
字典学习
字典学习是另外一种方法。它学习原始数据的稀疏表示。生成的矩阵称为字典,
字典中的向量称为原子。这些原子是简单的二元向量,由
0
1
填充。原始
数据中的每个实例都可以重建为这些原子的加权和。
假设原始数据中有
d
特征,字典中有
m
个原子,我们就可以有一个字典,它
要么是在不完备,
n
<
d
,要么是过完备
,
n
>
d
。不完备字典实现了降维,用
较少的向量表示原始数据,这是我们将关注的重点。
3
有一个小批量版本的字典学习,我们将应用到我们的数据集。和其他降维方
法一样,我们将设置成分的数量,还将设置批量大小和迭代次数来执行训练。
由于想使用二维散点图来可视化图像,我们将学习一个非常密集的字典,但
练习中,我们将使用一个更稀疏的版本:
# Mini-batch dictionary learning
from sklearn.decomposition import MiniBatchDictionaryLearning
3
过完备字典有不同的用途,在图像压缩等方面有应用。
降维
117
n_components = 50
alpha = 1
batch_size = 200
n_iter = 25
random_state = 2018
miniBatchDictLearning ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python数据分析

Python数据分析

Posts & Telecom Press, Ivan Idris
PyTorch深度学习

PyTorch深度学习

Posts & Telecom Press, Vishnu Subramanian
Kafka权威指南(第2版)

Kafka权威指南(第2版)

Gwen Shapira, Todd Palino, Rajini Sivaram, Krit Petty
Python实用技能学习指南

Python实用技能学习指南

Posts & Telecom Press, Robert Smallshire, Austin Bingham

Publisher Resources

ISBN: 9787519849498