- Deep Learning with Theano
- Christopher Bourez
- 93字
- 2021-07-15 17:17:00
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:

推薦閱讀
- Spring 5.0 By Example
- 自制編譯器
- MySQL數據庫管理與開發(慕課版)
- JavaScript動態網頁開發詳解
- Python數據分析從0到1
- C語言程序設計同步訓練與上機指導(第三版)
- Learning Unity 2D Game Development by Example
- Learning Concurrent Programming in Scala
- Service Mesh實戰:基于Linkerd和Kubernetes的微服務實踐
- 好好學Java:從零基礎到項目實戰
- Access 2010中文版項目教程
- Android應用開發實戰(第2版)
- 監控的藝術:云原生時代的監控框架
- C++程序設計
- Java EE 8 and Angular