Clustering text documents using k-means
源代码的链接为http://scikit-learn.org/stable/auto_examples/text/document_clustering.html
Loading 20 newsgroups dataset for categories:
['alt.atheism', 'talk.religion.misc', 'comp.graphics', 'sci.space']
3387 documents
4 categories Extracting features from the training dataset using a sparse vectorizer
done in 2.980000s
n_samples: 3387, n_features: 10000 Clustering sparse data with MiniBatchKMeans(batch_size=1000, compute_labels=True, init='k-means++',
init_size=1000, max_iter=100, max_no_improvement=10, n_clusters=4,
n_init=1, random_state=None, reassignment_ratio=0.01, tol=0.0,
verbose=False)
done in 0.514s Homogeneity: 0.506
Completeness: 0.576
V-measure: 0.539
Adjusted Rand-Index: 0.477
Silhouette Coefficient: 0.006 Top terms per cluster:
Cluster 0: hst nasa mission jpl ___ gov baalke access orbit __
Cluster 1: space henry nasa access toronto com alaska digex pat sky
Cluster 2: god com people sandvik keith don jesus article say think
Cluster 3: graphics com university thanks posting image host nntp computer ac
一、
TfidfVectorizer
HashingVectorizer
二、
Two algorithms are demoed: ordinary k-means and its more scalable cousin minibatch k-means
(To be continued)
Clustering text documents using k-means的更多相关文章
- 犀利的background-clip:text,实现K歌字幕效果
今天学到了一个新的CSS3属性,更准确的说是属性值,那就是background-clip:text.利用此属性值可以制作出很神奇的效果.可惜只有chrome支持,不过今天可以先来玩玩这个属性. 先来介 ...
- Classification of text documents: using a MLComp dataset
注:原文代码链接http://scikit-learn.org/stable/auto_examples/text/mlcomp_sparse_document_classification.html ...
- KNN 与 K - Means 算法比较
KNN K-Means 1.分类算法 聚类算法 2.监督学习 非监督学习 3.数据类型:喂给它的数据集是带label的数据,已经是完全正确的数据 喂给它的数据集是无label的数据,是杂乱无章的,经过 ...
- 软件——机器学习与Python,聚类,K——means
K-means是一种聚类算法: 这里运用k-means进行31个城市的分类 城市的数据保存在city.txt文件中,内容如下: BJ,2959.19,730.79,749.41,513.34,467. ...
- scikit-learn:4.2.3. Text feature extraction
http://scikit-learn.org/stable/modules/feature_extraction.html 4.2节内容太多,因此将文本特征提取单独作为一块. 1.the bag o ...
- sklearn文本特征提取
http://cloga.info/2014/01/19/sklearn_text_feature_extraction/ 文本特征提取 词袋(Bag of Words)表征 文本分析是机器学习算法的 ...
- Feature extraction - sklearn文本特征提取
http://blog.csdn.net/pipisorry/article/details/41957763 文本特征提取 词袋(Bag of Words)表征 文本分析是机器学习算法的主要应用领域 ...
- coursera课程Text Retrieval and Search Engines之Week 2 Overview
Week 2 OverviewHelp Center Week 2 On this page: Instructional Activities Time Goals and Objectives K ...
- 论文解读SDCN《Structural Deep Clustering Network》
前言 主体思想:深度聚类需要考虑数据内在信息以及结构信息. 考虑自身信息采用 基础的 Autoencoder ,考虑结构信息采用 GCN. 1.介绍 在现实中,将结构信息集成到深度聚类中通常需要解决以 ...
随机推荐
- ORACLE里锁有以下几种模式,v$locked_object,locked_mode【转】
ORACLE里锁有以下几种模式:0:none1:null 空2:Row-S 行共享(RS):共享表锁,sub share 3:Row-X 行独占(RX):用于行的修改,sub exclusive 4: ...
- make TARGET_PRODUCT=am335xevm OMAPES=4.x rowboat_clean 出现sgx相关的错误
这些错误是一些链接错误,由于地址变更导致的软链接不对.所以只要更改下软链接的具体地址就可以.
- Zabbix3.0 安装Graphtree
zabbix中,想要集中展示图形,唯一的选择是screen,zatree可以解决这个问题,但是性能不是很好. Graphtree由OneOaas开发并开源出来,用来解决zabbix的图形展示问题,性能 ...
- 笨方法学python--提问
1 实现 用户在终端进行输入 的方法 print "how old are you?", age = raw_input() 该地方,第1名后面加逗号,然后必须换行 2 若要限制用 ...
- js获取页面的来源页
<html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat=&quo ...
- Happy Matt Friends
Happy Matt Friends Time Limit: 6000/6000 MS (Java/Others) Memory Limit: 510000/510000 K (Java/Oth ...
- Alert()与Redirect()同时使用失效的问题
例如以下代码: echo "<script>alert('跳转到博客园');</script>"; redirect(“www.cnblogs.com”); ...
- Lucene入门教程(转载)
http://blog.csdn.net/tianlincao/article/details/6867127 Lucene教程 1 lucene简介 1.1 什么是lucene Lucene ...
- 如何参与Hibernate-ORM项目
1.注册 hibernate jira账户,hibernate中的issue和bug都会在此论坛发布 注册地址:https://hibernate.onjira.com 2.创建Hibernate-O ...
- POJ 2289 Jamie's Contact Groups
二分答案+网络最大流 #include<cstdio> #include<cstring> #include<cmath> #include<vector&g ...