官术网_书友最值得收藏!

Programatically finding the best model

Now that we have seen how to produce scores that represent how good or bad a model's predictive power is, you may go ahead and start specifying lots of models manually by changing the combinations of variables sent to the lm() function, compute each model's scores, and then choose the ones with the highest predictive power. This can potentially take a large amount of time, and you may want to delegate it to someone else since it's tedious work. However, fear not. There's a better way! Computers are good at repetitive and tedious tasks, and now we'll see how to tell the computer to find the best model for us with a little bit of programming.

The following sections will increase the programming level, but don't worry we'll explain the code in detail to make sure that everything is understood. If at any point you feel confused, you can always copy-paste small snippets of code into your R terminal and see what each of them are doing inpidually to gradually get a sense of the whole thing.

主站蜘蛛池模板: 阿克苏市| 忻州市| 鱼台县| 盐城市| 衢州市| 黄骅市| 华亭县| 汉源县| 繁昌县| 开鲁县| 榆林市| 菏泽市| 龙井市| 沙雅县| 南江县| 阳曲县| 长春市| 喀喇| 黎川县| 裕民县| 额济纳旗| 收藏| 榆树市| 吉安市| 吉首市| 建水县| 读书| 建瓯市| 潼南县| 昌宁县| 聂荣县| 勃利县| 高碑店市| 乌拉特后旗| 遂川县| 开鲁县| 松桃| 梅州市| 阳东县| 松江区| 平阳县|