第1天:Python安装使用及机器学习概览

任务

  • 阅读
    • Machine Learning in Action(对应第一章)
  • 实践
    • 安装python环境
    • 导入NumPy、BeautifulSoup等数据挖掘与机器学习所需要的模块

实践

# 官方demo
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from matplotlib import cm

fig = plt.figure()
ax = fig.gca(projection='3d')
X, Y, Z = axes3d.get_test_data(0.05)
ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
cset = ax.contourf(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
cset = ax.contourf(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
cset = ax.contourf(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm)

ax.set_xlabel('X')
ax.set_xlim(-40, 40)
ax.set_ylabel('Y')
ax.set_ylim(-40, 40)
ax.set_zlabel('Z')
ax.set_zlim(-100, 100)
plt.show()

阅读

Machine Learning in Action第一章:机器学习基础

  • 总结本章中比较重要的观点
    • 机器学习让我们从“生”的数据集中提炼出有意义的信息,以便我们从中获取洞见

    With machine learning we can gain insight from a dataset,not cyborg rote memorization, and not the creation of sentient beings
    Machine learning is turning data into information

  • 机器学习是一门运用统计学的学科,之所以需要统计学,因为现实世界中并没有那么多确定性

Machine learning uses statistics.There are many problems where the solution isn’t deterministic. That is, we don’t know enough about the problem or don’t have enough computing power to properly model the problem. For these problems we need statistics.

  • 机器学习问题分类


  • 机器学习一般步骤
    • 收集数据源
    • 准备输入数据
    • 分析输入数据
    • 训练算法
    • 测试算法
    • 使用
  • 名词解释
  • expert systems(专家系统): 可以像某个领域的专家那样处理专业问题的系统

By creating a computer program to recognize birds, we’ve replaced an ornithologist with a computer. The ornithologist is a bird expert, so we’ve created an expert system.

  • features/attributes(特征): 类似于标签,是对事物属性的描述

features可以有以下几种取值:

  • numeric
  • binary
  • enumeration
  • classifiction(归类)

For the moment, assume we have all that information. How do we then decide if a bird at our feeder is an Ivory-billed Woodpecker or somethingelse? This task is called classification.

  • regression(回归): 对于数值变化的预测,揭示出数值变化的规律

Regression is the prediction of a numeric value.

  • training set(训练集):用以训练算法的数据源

A training set is the set of training examples we’ll use to train our machine learning algorithms.

  • target variable(目标变量):机器学习算法预测的目标值

The target variable is what we’ll be trying to predict with our machine learning algorithms. In classification the target variable takes on a nominal value, and in the task of regression its value could be continuous.

  • test set(测试集):是从training set中分割出来的数据集,用以测试算法的准确性

To test machine learning algorithms what’s usually done is to have a training set of data and a separate dataset, called a test set.

  • supervised learning(监督学习): 人为干预(为数据贴标签等)情况下的机器学习

This set of problems is known as supervised because we’re
telling the algorithm what to predict.

  • unsupervised learning(非监督学习):人为不干预,如聚类问题

In unsupervised learning, there’s no label or target value given for the data. A task where we group similar items together is known as clustering.

资源汇总

python官网
python官网windows版本下载
python环境准备网络博客
codecademy上的Python学习
windows下面安装Python和pip终极教程
Python中的Numpy、SciPy、MatPlotLib安装与配置

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,242评论 5 459
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 81,769评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 141,484评论 0 319
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,133评论 1 263
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,007评论 4 355
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,080评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,496评论 3 381
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,190评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,464评论 1 290
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,549评论 2 309
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,330评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,205评论 3 312
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,567评论 3 298
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,889评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,160评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,475评论 2 341
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,650评论 2 335

推荐阅读更多精彩内容