- 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:

推薦閱讀
- Python程序設計教程(第2版)
- Windows Presentation Foundation Development Cookbook
- 你不知道的JavaScript(中卷)
- Apache Kafka Quick Start Guide
- 計算機應用基礎實踐教程
- Windows Embedded CE 6.0程序設計實戰
- Android應用開發深入學習實錄
- ExtJS Web應用程序開發指南第2版
- 零基礎輕松學C++:青少年趣味編程(全彩版)
- SSH框架企業級應用實戰
- WordPress Search Engine Optimization(Second Edition)
- Hands-On Artificial Intelligence with Unreal Engine
- JavaScript前端開發程序設計教程(微課版)
- 嵌入式Linux與物聯網軟件開發:C語言內核深度解析
- Learning Akka