Created
July 27, 2016 09:34
-
-
Save allwefantasy/2170f67c9e1e453604e2e76923ee65dc to your computer and use it in GitHub Desktop.
机器学习模型训练
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"als_training": { | |
"desc": "测试", | |
"strategy": "streaming.core.strategy.SparkStreamingStrategy", | |
"algorithm": [], | |
"ref": [], | |
"compositor": [ | |
{ | |
"name": "streaming.core.compositor.spark.source.MockJsonCompositor", | |
"params": [ | |
{ | |
"a": "http://123.com/path?userId=1&itemId=2" | |
}, | |
{ | |
"a": "http://123.com/path?userId=2&itemId=3" | |
}, | |
{ | |
"a": "http://123.com/path?userId=2&itemId=2" | |
}, | |
{ | |
"a": "http://123.com/path?userId=3&itemId=2" | |
} | |
] | |
}, | |
{ | |
"name": "streaming.core.compositor.spark.transformation.JSONTableCompositor", | |
"params": [ | |
{ | |
"tableName": "test" | |
} | |
] | |
}, | |
{ | |
"name": "streaming.core.compositor.spark.transformation.SQLCompositor", | |
"params": [ | |
{ | |
"sql": [ | |
"select", | |
"split(split(split(a,'\\?')[1],'&')[0],'=')[1] as user, ", | |
"split(split(split(a,'\\?')[1],'&')[1],'=')[1] as item,", | |
"split(split(split(a,'\\?')[1],'&')[0],'=')[1] as label,", | |
"'1.0' as rating", | |
"from test" | |
], | |
"outputTableName":"test2" | |
} | |
] | |
}, | |
{ | |
"name": "streaming.core.compositor.spark.transformation.SQLCompositor", | |
"params": [ | |
{ | |
"sql": [ | |
"select", | |
"concat_ws(',',user,item,rating) as features,", | |
"label", | |
"from test2" | |
] | |
} | |
] | |
}, | |
{ | |
"name": "streaming.core.compositor.spark.output.AlgorithmOutputCompositor", | |
"params": [ | |
{ | |
"path": "/tmp/als_log", | |
"algorithm": "als" | |
}, | |
{ | |
"rank": 10, | |
"alpha": 1.0 | |
} | |
] | |
} | |
], | |
"configParams": { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment