Merge pull request #3 from mephistopheies/pn-refactor

added comments to functions
fixed rbm compute outputh method; added elasticnet regularization