MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / predict

Function predict

examples/machine_learning/logistic_regression.cpp:33–36  ·  view source on GitHub ↗

Predict based on given parameters

Source from the content-addressed store, hash-verified

31
32// Predict based on given parameters
33array predict(const array &X, const array &Weights) {
34 array Z = matmul(X, Weights);
35 return sigmoid(Z);
36}
37
38void cost(array &J, array &dJ, const array &Weights, const array &X,
39 const array &Y, double lambda = 1.0) {

Callers 3

costFunction · 0.70
logit_demoFunction · 0.70

Calls 2

matmulFunction · 0.50
sigmoidFunction · 0.50

Tested by

no test coverage detected