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

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:

主站蜘蛛池模板: 淳安县| 定远县| 乌鲁木齐市| 石台县| 永靖县| 平潭县| 米易县| 平潭县| 德钦县| 洪泽县| 原阳县| 珲春市| 崇左市| 维西| 泸水县| 广西| 吉林省| 米林县| 永年县| 巴彦县| 丹东市| 莫力| 普洱| 贞丰县| 贺兰县| 高陵县| 达孜县| 双桥区| 延川县| 罗平县| 施甸县| 平潭县| 新乐市| 连山| 巫山县| SHOW| 民乐县| 新津县| 行唐县| 沂水县| 房产|