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