com.github.nearbydelta.deepspark.data
Objective Function: Cosine Similarity Error
val output = net(input) val err = CosineErr(real, output) val diff = CosineErr.derivative(real, output)
This function returns 1 - cosine similarity, i.e. cosine dissimiarlity.
Compute error (loss)
the expected real output
the computed output of the network
the error
Compute differentiation value of this objective function at x = r - o
x = r - o
the expected real output, r
r
the computed output of the network, o
o
differentiation value at f(x)=fx, which is a column vector
f(x)=fx
Objective Function: Cosine Similarity Error
This function returns 1 - cosine similarity, i.e. cosine dissimiarlity.