java - Artificial Neural network PSO training -
i working on ff neural network (used classification problems) training using pso. have 1 hidden layer , can vary amount of neurons in layer.
my problem nn can learn linearly separable problems quite can not learn problems not linearly separable(like xor) should able do.
i believe pso working correctly because cans see tries minimises error function of each particle (using mean squared error on training set).
i have tried using sigmoid , linear activation function similar(bad) results. have bias unit(which doesn't much).
what want know if there specific might doing wrong might cause type of problem, or maybe things should @ error might be.
i bit lost @ moment
thanks
pso can train neural network non-solve linearly separable problems, xor. i've done before, algorithm takes 50 or iterations @ most. sigmoid activation function xor. if converge non-separable problems guess somehow hidden layer not having effect, or bypassed. hidden layer typically allows non-separable.
when debug ai find useful determine first if training code or evaluation code (the neural network in case) @ fault. might want create 2nd trainer network. can make sure network code calculating output correctly. simple "hill climber". pick random weight , change random small amount (up or down). did error better? keep weight change , repeat. did error worse, drop change , try again.
Comments
Post a Comment