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

Cost function and errors

The cost function given the predicted probabilities by the model is as follows:

cost = -T.mean(T.log(model)[T.arange(y.shape[0]), y])

The error is the number of predictions that are different from the true class, averaged by the total number of values, which can be written as a mean:

error = T.mean(T.neq(y_pred, y))

On the contrary, accuracy corresponds to the number of correct predictions divided by the total number of predictions. The sum of error and accuracy is one.

For other types of problems, here are a few other loss functions and implementations:

主站蜘蛛池模板: 丽水市| 滕州市| 宁陕县| 霞浦县| 河池市| 英超| 泰顺县| 玉溪市| 甘南县| 邻水| 日土县| 勐海县| 当涂县| 双鸭山市| 磐安县| 治多县| 仁化县| 游戏| 仁化县| 怀来县| 湖南省| 界首市| 天柱县| 花莲市| 乌苏市| 深州市| 景东| 东丽区| 剑川县| 双鸭山市| 上虞市| 西丰县| 长顺县| 四川省| 梅河口市| 乌海市| 常宁市| 缙云县| 海晏县| 枣庄市| 许昌市|