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

Training the baseline model

In this section, we will perform actual training using the following ML algorithms. This step is time-consuming as it needs more computation power. We use 75% of the training dataset for actual training and 25% of the dataset for testing in order to measure the training accuracy.

You can find the code snippet in the following figure:

Training the baseline model

Figure 1.52: Code snippet for performing training

In the preceding code snippet, you can see that we performed the actual training operation using the fit() function from the scikit-learn library. This function uses the given parameter and trains the model by taking the input of the target data attribute and other feature columns.

Once you are done with this step, you'll see that our different ML algorithms generate different trained models. Now it's time to check how good our trained model is when it comes to prediction. There are certain techniques that we can use on 25% of the dataset. In the next section, we will understand these techniques.

主站蜘蛛池模板: 仙桃市| 永丰县| 句容市| 吴桥县| 广昌县| 渭南市| 正镶白旗| 昭觉县| 多伦县| 聊城市| 连南| 长治县| 泌阳县| 裕民县| 榆林市| 元氏县| 古浪县| 白玉县| 曲水县| 紫阳县| 石嘴山市| 乐陵市| 乐陵市| 太白县| 榆中县| 大姚县| 长治县| 黔西县| 翼城县| 佳木斯市| 徐州市| 农安县| 乌海市| 迭部县| 筠连县| 方正县| 浦东新区| 莲花县| 宝鸡市| 汶上县| 灯塔市|