101102103104105106107108109110111
for (int i = 0; i < 10000; i++) { //logRegression.trainWithAdagrad(x, y); logRegression.train(x_xor_Matrix, y_xor_Matrix, 0.001); } Matrix predictions = logRegression.predict(x_xor_Matrix);
148149150151152153154155156157158
double learningRate = 0.001; for (int i = 0; i < 10000; i++) { logRegression.train(xMatrix, yMatrix, learningRate); learningRate *= 0.999; } // Matrix predictions = logRegression.predict(xTestMatrix);
187188189190191192193194195196197
double learningRate = 0.001; for (int i = 0; i < 10000; i++) { logRegression.train(input, labels, learningRate); learningRate *= 0.999; } // Matrix predictions = logRegression.predict(xTestMatrix);
229230231232233234235236237238239
double learningRate = 0.001; for (int i = 0; i < 1000; i++) { logRegression.train(input, labels, learningRate); learningRate *= 0.999; } // Matrix predictions = logRegression.predict(xTestMatrix);