Escolar Documentos
Profissional Documentos
Cultura Documentos
float[][] x = DataUtils.readInputsFromFile("data/x.txt");
int[] t = DataUtils.readOutputsFromFile("data/t.txt");
@Override
public void failure(Error error) {
System.out.println("Error: " + error.getDescription());
}
});
neuralNetwork.startLearning();
Output:
This project has a example with real data that contains a list of 250 patients with two
results of a analysis as inputs and 0 or 1 (depending if the has a disease or not) as
output:
Inputs Output
------------------------ --------------------
Result 1 Result 2 Disease
----------------------- --------------------
-0.5982 0.9870 1
-0.2019 0.6210 1
0.1797 0.4518 0
-0.0982 0.5876 1
... ... ...
Using this data in neural network, this project is able to predict the output (disease
result) of a patient that isn't in the data list with a minimum percentage of success of
88%.
ALGORITHM:
1. First of all, load input and output data. You can read it from external text file:
4. @Override
5. public void success(Result result) {
6. float[] valueToPredict = new float[] {-1.2f, 0.796f};
7. System.out.println("Predicted result: " +
result.predictValue(valueToPredict));
8. }
AIM:
Simple neural network is a Java project that allow users to easily create a asynchronous
simple neural network.
Features
Callback with a result entity
Number of neurons customizable
Read data from external files
Simple predictor usage