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

  • R Programming By Example
  • Omar Trejo Navarro
  • 182字
  • 2021-07-02 21:30:45

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.

主站蜘蛛池模板: 双辽市| 孝义市| 吴川市| 两当县| 凉城县| 阿拉善左旗| 东安县| 临澧县| 惠来县| 九寨沟县| 临高县| 绍兴县| 扶余县| 岗巴县| 新竹县| 甘德县| 定结县| 大埔县| 富阳市| 灵石县| 亚东县| 松滋市| 定边县| 友谊县| 汝南县| 岢岚县| 兰溪市| 措美县| 隆子县| 缙云县| 噶尔县| 元氏县| 扎兰屯市| 上蔡县| 南木林县| 方山县| 顺昌县| 都江堰市| 佛教| 广西| 青浦区|