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

  • 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.

主站蜘蛛池模板: 资兴市| 运城市| 汉沽区| 密云县| 禹城市| 诸暨市| 富裕县| 涞水县| 广南县| 商丘市| 中西区| 安泽县| 恩平市| 忻州市| 浠水县| 金川县| 团风县| 广灵县| 湘西| 英吉沙县| 依兰县| 澎湖县| 霍山县| 巴东县| 应城市| 广汉市| 永春县| 专栏| 南京市| 周至县| 东乡族自治县| 南溪县| 永州市| 克东县| 藁城市| 鲁甸县| 双柏县| 栾川县| 临澧县| 高台县| 浮梁县|