今天碰巧看到了Google 2011 I/O 上發佈的一段視頻,看完才知道原來還有Prediction api這麼好玩的東西。原理應該是機器學習和聚類分析。
這個可以拿來做“失眠”的那個項目
Google prediction api
put prediction/v1.2/training/io11%2fmy_data
{
"classLabel":"#youtube",
"cvsInstance":["I just saw thic wicked cool video"]
}
Subscript Pretrain Model
POST prediction/v1.2/hostedmodels/[model_name]/predit
{"input":{
"csvInstance":[col1_value,col2_value,...]}
}
konw sentiment
prediction .hsostedmodels.predict(
{'hostedModelName':'sample.sentiment',
'input':{'csvInstance':[...]}
}