Skip to content

Neural network API for java with backpropagation and particle swarm optimization as training methods

License

Notifications You must be signed in to change notification settings

CarlosSoPe6/JMagicBrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

JMagicBrain is a Neural network API for java with backpropagation and particle swarm optimization as training methods

Disclaimer

This is a school project, not for real world apps

Tutorial

    ActivationFunction activationFunction = new Sigmoid();
    ErrorFunction errorFunction = new MeanSquaredError();
    WeightInitializer weightInitializer = new DefaultInitializer();
    
    TrainMethod trainMethod = new BackPropagation.BackPropagationBuilder()
        .setErrorFunction(errorFunction)
        .setMaxEpochs(1000)
        .setMaxError(0.09)
        .setMomentum(0.099099)
        .setLearningRate(0.031099)
        .setTrainingSet(images)
        .setExpectedOutput(expected)
        .build();
    
    neuralNetwork = new NeuralNetwork.NeuralNetworkBuilder()
        .setActivationFunction(activationFunction)
        .setErrorFunction(errorFunction)
        .setTrainingMethod(trainMethod)
        .setWeightInitializer(weightInitializer)
        .addLayer(784)
        .addLayer(16)
        .addLayer(10)
        .build();
        
    neuralNetwotk.train();
    

About

Neural network API for java with backpropagation and particle swarm optimization as training methods

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages