源代码的链接为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的更多相关文章

  1. 犀利的background-clip:text,实现K歌字幕效果

    今天学到了一个新的CSS3属性,更准确的说是属性值,那就是background-clip:text.利用此属性值可以制作出很神奇的效果.可惜只有chrome支持,不过今天可以先来玩玩这个属性. 先来介 ...

  2. Classification of text documents: using a MLComp dataset

    注:原文代码链接http://scikit-learn.org/stable/auto_examples/text/mlcomp_sparse_document_classification.html ...

  3. KNN 与 K - Means 算法比较

    KNN K-Means 1.分类算法 聚类算法 2.监督学习 非监督学习 3.数据类型:喂给它的数据集是带label的数据,已经是完全正确的数据 喂给它的数据集是无label的数据,是杂乱无章的,经过 ...

  4. 软件——机器学习与Python,聚类,K——means

    K-means是一种聚类算法: 这里运用k-means进行31个城市的分类 城市的数据保存在city.txt文件中,内容如下: BJ,2959.19,730.79,749.41,513.34,467. ...

  5. scikit-learn:4.2.3. Text feature extraction

    http://scikit-learn.org/stable/modules/feature_extraction.html 4.2节内容太多,因此将文本特征提取单独作为一块. 1.the bag o ...

  6. sklearn文本特征提取

    http://cloga.info/2014/01/19/sklearn_text_feature_extraction/ 文本特征提取 词袋(Bag of Words)表征 文本分析是机器学习算法的 ...

  7. Feature extraction - sklearn文本特征提取

    http://blog.csdn.net/pipisorry/article/details/41957763 文本特征提取 词袋(Bag of Words)表征 文本分析是机器学习算法的主要应用领域 ...

  8. 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 ...

  9. 论文解读SDCN《Structural Deep Clustering Network》

    前言 主体思想:深度聚类需要考虑数据内在信息以及结构信息. 考虑自身信息采用 基础的 Autoencoder ,考虑结构信息采用 GCN. 1.介绍 在现实中,将结构信息集成到深度聚类中通常需要解决以 ...

随机推荐

  1. Django urls常用匹配语法

    url from django.conf.urls import url from . import views urlpatterns = [ url(r'^articles/2003/$', vi ...

  2. ant android打包--学习第一弹

    1. 准备工作 用eclipse创建一个android项目 安装ant和SDK,并且添加到系统环境变量 2.ant 使用 2.1 ant简单的帮助命令 ant -p 2.2 创建ant配置文件%AND ...

  3. jquery 展开关闭效果

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  4. 初识Selenium(二)

    ---------------------------------------------------------------------------------------------------- ...

  5. python 基本的序列和映射规则

    >>> def checkIndex(key):...     if not isinstance(key,(int,long)):raise TypeError...     if ...

  6. JSP 语法/标签

    ┣1.declaration Declaration定义了JSP脚本语言使用的变量和函数,这类似于Java中定义全局变量,或可以把它想像成pascal编程语言中的单元文件的interface部分.声明 ...

  7. 转:loadruner报错:Step download timeout(120 seconds)的一个解决方法

    一个网友问了我一个问题如下:loadruner报错:Error -27728: Step download timeout (120 seconds) 如何解决语法检查通过,但是在并发执行一个查询时候 ...

  8. messages exchanged between the client's and server's computers will never be lost, damaged, or received out of order. [1]

    w几乎所有的HTTP通信都由TCP/IP承载. HTTP The Definitive Guide Just about all of the world's HTTP communication i ...

  9. Windows下MongoDB安装及创建用户名和密码

    下载MongoDB的安装文件https://www.mongodb.com/download-center#community,选择合适的版本(注:本人选择的是3.2.6) 下载完MongoDB.ms ...

  10. JavaEE程序编码规范

    JavaEE程序编码规范 目   录 JAVA程序编码规范1 1变量的命名规则1 1.1常量(包含静态的)1 1.2类变量(静态变量)及实例变量1 1.3局部变量1 1.4参数2 1.5其它2 2方法 ...