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

Getting ready

In the previous section, we assigned the same weightage for each class; that is, the categorical cross entropy loss is the same if the magnitude of difference between actual and predicted is the same, irrespective of whether it is for the prediction of a default or not a default.

To understand the scenario further, let's consider the following example:

In the preceding scenario, the cross-entropy loss value is just the same, irrespective of the actual value of default.

However, we know that our objective is to capture as many actual defaulters as possible in the top 10% of predictions when ranked by probability.

Hence, let's go ahead and assign a higher weight of loss (a weight of 100) when the actual value of default is 1 and a lower weightage (a weight of 1) when the actual value of default is 0.

The previous scenario now changes as follows:

 

Now, if we notice the cross entropy loss, it is much higher when the predictions are wrong when the actual value of default is 1 compared to the predictions when the actual value of default is 0.

Now that we have understood the intuition of assigning weightages to classes, let's go ahead and assign weights to output classes in the credit default dataset.

All the steps performed to build the dataset and model remain the same as in the previous section, except for the model-fitting process.

主站蜘蛛池模板: 射阳县| 正蓝旗| 高雄市| 瓦房店市| 顺昌县| 沭阳县| 北宁市| 南乐县| 成安县| 城市| 霍林郭勒市| 延寿县| 平定县| 满城县| 都江堰市| 合肥市| 通渭县| 华亭县| 石家庄市| 洞口县| 淳安县| 视频| 庄浪县| 阳信县| 布拖县| 确山县| 河北省| 泽州县| 满洲里市| 垦利县| 岱山县| 子洲县| 蓝山县| 闵行区| 昌邑市| 淮北市| 安康市| 土默特右旗| 大足县| 广河县| 安岳县|