1. 亚马逊 机器学习 服务 的实例 基本操作 步骤
  2. Amazon Machine Learning

https://aws.amazon.com/machine-learning/

  1. Steps
  • Step 1: Prepare Your Data
  • Step 2: Create a Training Datasource
  • Step 3: Create an ML Model
  • Step 4: Review the ML Model's Predictive Performance
  • Step 5: Use the ML Model to Generate Predictions
  • Step 6: Clean Up

准备数据(清洗,转换...)→选模型→检查结果→预测新数据→清理




1. 控制台 北弗吉尼亚

https://console.aws.amazon.com/machinelearning/home?region=us-east-1#/


2. 数据集

亚马逊示例数据  https://s3.amazonaws.com/aml-sample-data/banking.csv

验证后



Remark

a)可以是文件,也可以是目录

b)原始数据


age,job,marital,education,default,housing,loan,contact,month,day_of_week,duration,campaign,pdays,previous,poutcome,emp_var_rate,cons_price_idx,cons_conf_idx,euribor3m,nr_employed,y

44,blue-collar,married,basic.4y,unknown,yes,no,cellular,aug,thu,210,1,999,0,nonexistent,1.4,93.444,-36.1,4.963,5228.1,0

53,technician,married,unknown,no,no,no,cellular,nov,fri,138,1,999,0,nonexistent,-0.1,93.2,-42,4.021,5195.8,0

28,management,single,university.degree,no,yes,no,cellular,jun,thu,339,3,6,2,success,-1.7,94.055,-39.8,0.729,4991.6,1

39,services,married,high.school,no,no,no,cellular,apr,fri,185,2,999,0,nonexistent,-1.8,93.075,-47.1,1.405,5099.1,0

3. 确认Schema

显示了前3行数据

Remark:

a)第一行,是每个字段的名字

b)数据类型, 只有4种

Binary

Categorical

Numeric

Text

c)数值型Numeric是指可以比较大小的类型,如体重,收入;但员工号,月份序号,邮编不是数值型,是枚举型Categorical


Schema文件内容


4. 选定目标列


5. 是否包含RowID列

RowID列不会用于模型计算, 可以增加可读性


6.  数据集概览


7. 创建模型

目前支持的模型,只有3个:http://docs.aws.amazon.com/zh_cn/machine-learning/latest/dg/types-of-ml-models.html

  • Binary Classification Model
  • Multiclass Classification Model
  • Regression Model

评价模型http://docs.aws.amazon.com/zh_cn/machine-learning/latest/dg/evaluating_models.html

从训练数据中选取部分,顺序选,随机选等,预防过拟合Overfitting

给ML模型和评价模型 取名字



8. 再次概览


9. 生成模型


具体:

a)


b)



c)



11. 评价


12. 调整, 点击(Adjust score threshold)


13. 预测

模型可用后, 会在左侧多多来一个菜单





14. 结果



还可以创建 endpoint


附录:

人工智能服务组

  1. Artificial Intelligence

  1. 机器学习资源列表

示例代码  https://github.com/awslabs/machine-learning-samples

文档         https://aws.amazon.com/documentation/machine-learning/

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐