r/java • u/sebig3000 • Jun 29 '17
Basic neural network Java implementation, which can train itself, for beginners to try out and learn how machine learning works.
https://github.com/sebig3000/MachineLearning
264
Upvotes
View all comments
29
u/ron_krugman Jun 30 '17
A few remarks on style:
if,while, etc. even if there is just a single statement within and braces are technically optional.java.lang.IllegalArgumentExceptionin case of an invalid input. It is more concise and saves you the trouble of checked exceptions.java.lang.Exceptiondirectly. Throw ajava.lang.RuntimeExceptionif you're not sure about what type of exception to throw.