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

Function predict

examples/machine_learning/perceptron.cpp:29–31  ·  view source on GitHub ↗

Predict based on given parameters

Source from the content-addressed store, hash-verified

27
28// Predict based on given parameters
29array predict(const array &X, const array &Weights) {
30 return sigmoid(matmul(X, Weights));
31}
32
33array train(const array &X, const array &Y, double alpha = 0.1,
34 double maxerr = 0.05, int maxiter = 1000, bool verbose = false) {

Callers 5

trainFunction · 0.70
benchmark_perceptronFunction · 0.70
perceptron_demoFunction · 0.70
trainMethod · 0.70
trainMethod · 0.70

Calls 2

sigmoidFunction · 0.50
matmulFunction · 0.50

Tested by

no test coverage detected