ML之RF:利用Js语言设计随机森林算法【DT之CART算法(gain index)】&并应用随机森林算法
目录
- var doTest = function() {
- option = {};
- option.-property">treeNumber = 100;
- option.-property">bagNumber = g.-property">samples.-property">length*0.80;
- option.-property">depth = 8;
- option.-property">bestSelect = 10;
-
- var forest = createForest(g.-property">samples, option);
-
- var result = {};
- for(var x = -23; x <= 23; x += 1) {
- for(var y = -23; y <= 23; y += 1) {
- var sample = [x/10, y/10];
- var pred = predWithForest(forest, sample);
- result[x/10 + ',' + y/10] = pred;
- }
- }
- return result;
- }
网站声明:如果转载,请联系本站管理员。否则一切后果自行承担。
添加我为好友,拉您入交流群!
请使用微信扫一扫!