UNPKG
nnet
Version:
latest (1.0.1)
1.0.1
1.0.0
A very simple multi layer neural network written in plain JavaScript.
nnet
/
Error.js
18 lines
(12 loc)
•
268 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const
Matrix
=
require
(
'./Matrix'
);
class
Error
{
/** * *
@param
{
Matrix
}
target
*
@param
{
Matrix
}
prediction
*/
static
meanSquaredError
(
target, prediction
) {
return
target.
subtract
(prediction); } }
module
.
exports
=
Error
;