资源简介
Python数据挖掘入门与实践 数据集及代码
代码片段和文件信息
import os
import re
from mrjob.job import MRJob
from mrjob.step import MRStep
word_search_re = re.compile(r“[\w‘]+“)
class ExtractPosts(MRJob):
post_start = False
post = []
def mapper(self key line):
filename = os.environ[“map_input_file“]
gender = filename.split(“.“)[1]
try:
docnum = int(filename[0])
except:
docnum = 8
if filename.startswith(“51“):
# remove leading and trailing whitespace
line = line.strip()
if line == ““:
self.post_start = True
elif line == “ “:
self.post_start = False
yield gender repr(“\n“.join(self.post))
self.post = []
elif self.post_start:
self.post.append(line)
if __name__ == ‘__main__‘:
ExtractPosts.run()
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-09-27 07:16 LearningDataMiningWithPython-master\
文件 764 2016-09-27 07:16 LearningDataMiningWithPython-master\.gitignore
文件 1112 2016-09-27 07:16 LearningDataMiningWithPython-master\INSTALL.md
目录 0 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\
目录 0 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 1\
文件 1000 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 1\affinity_dataset.txt
文件 16777 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 1\ch1_affinity.ipynb
文件 3670 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 1\ch1_affinity_create.ipynb
文件 13847 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 1\ch1_oner_application.ipynb
目录 0 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 10\
文件 78925 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 10\Chapter 10 Clusterer.ipynb
目录 0 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 11\
文件 59206 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 11\Chapter 11 (CIFAR).ipynb
文件 62409 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 11\Chapter 11 (Theano and Lasagne).ipynb
目录 0 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 12\
文件 38759 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 12\CH12 MapReduce Basics.ipynb
文件 10578 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 12\Chapter 12 (NB Predict).ipynb
文件 1730 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 12\Chapter 12 (Test load).ipynb
文件 882 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 12\extract_posts.py
文件 1986 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 12\nb_predict.py
文件 2021 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 12\nb_train.py
目录 0 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 2\
文件 143291 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 2\Ionosphere Nearest Neighbour.ipynb
目录 0 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 3\
文件 45385 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 3\Basketball Results.ipynb
目录 0 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 4\
文件 46259 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 4\ch4 Affinity Analysis.ipynb
目录 0 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 5\
文件 1034 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 5\adult_tests.py
文件 13293 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 5\ch5_adult.ipynb
文件 29985 2016-09-27 07:16 LearningDataMiningWithPython-master\LearningDataMiningBook\Chapter 5\ch5_advertisements.ipynb
............此处省略18个文件信息
- 上一篇:Python数据爬虫及可视化分析
- 下一篇:渗透测试学习资料
相关资源
- Python数据爬虫及可视化分析
- python小波包文档及论文.zip
- Python-100-Days-master.rar
- Introduction to Programming in Python An Inter
- Introduction to Machine Learning with Python.p
- gan简单代码实现python
- python安装器easy_install
- python火车票查询软件及源码
- selenium最新版2.53.1---python
- python Tkinter
- 批量文件.py
- 一套最新价值1680元的python爬虫实战全
- 测试工程师相关学习视频(包含pyth
- Building Django 2.0 Web Applications
- 轻量级PythonWeb框架Mole.zip
- 谁说菜鸟不用数据分析
- Python源码剖析★PART2★(完整清晰版
- mysqlclient-1.3.13-cp36-cp36m-win32.whl
- Python-一系列高品质的动漫人脸数据集
- Python-Insightface人脸检测识别的最小化
- 非线性回归Python代码
- python 使用pandas操作EXCEL表格数据
- 卷积神经网络图像识别python代码pdf
- pytorch_pose_proposal_networks-master.zip
- 关于吃豆人的游戏代码python
- 基于Python的离线Google地图操作实现
- 11-Python爬虫工程师-App抓取进阶
- 093 2018北风网人工智能视频(完结)转
- Python+OpenCv项目代码
- 疯狂Python讲义_李刚_2019
评论
共有 条评论