graphlab

机器学习的一个核心目标是对输入数据进行分类。例如一个训练好的分类器,输入一张图片便可预测这张图中是狗还猫。

用来分类的方法有很多,支持向量机、逻辑回归、深度学习等

假设我们有一个1024行的SFrame数据集, 我们要随机把它分割成90%/10%.

>>> sf = graphlab.SFrame({'id': range(1024)})
>>> sf_train, sf_test = sf.random_split(.9, seed=5)
>>> print len(sf_train), len(sf_test)

What is a seed?

The seed is a number that controls whether the Random Number Generator produces a new set of random numbers or repeats a particular sequence of random numbers. If the text box labeled “Seed” is blank, the Random Number Generator will produce a different set of random numbers each time a random number table is created. On the other hand, if a number is entered in the “Seed” text box, the Random Number Generator will produce a set of random numbers based on the value of the Seed. Each time a random number table is created, the Random Number Generator will produce the same set of random numbers, until the Seed value is changed.

Note: The ability of the seed to repeat a random sequence of numbers assumes that other User specifications (i.e., quantity of random numbers, minimum value, maximum value, whether duplicate values are permitted) are constant across replications. The use of a seed is illustrated in Sample Problem 1.

922 102
训练集

测试集

http://suanfazu.com/t/graphlab-create-geng-jian-dan-geng-qiang-da-de-shen-du-xue-xi/275
http://bugra.github.io/work/notes/2014-04-06/graphs-databases-and-graphlab/
http://ju.outofmemory.cn/entry/85316

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值