pluskid / Mocha.jl

Deep Learning framework for Julia
Other
1.29k stars 254 forks source link

Regression with Mocha? #176

Closed mcreel closed 8 years ago

mcreel commented 8 years ago

I'm interested in using mocha for multivariate multiple regression (real valued continuous inputs, real valued continuous outputs). While this looks pretty straightforward conceptually, any simple examples or tips would be appreciated. My plan is to work with a simple test problem to begin with (two inputs, one output). My actual problem of interest has about 50 inputs and 10 outputs.

pluskid commented 8 years ago

yes, you basically need to change the softmax-loss layer to square-loss layer to compare real valued outputs.

mcreel commented 8 years ago

OK, thanks, I'll give it a try. So far, the demos work fine, and the whole frameworks looks very useful.

mcreel commented 8 years ago

Switching the loss layer works ok, using the mnist example. I would like to try this using some simple generated data, but I can't seem to figure out how to get the data into the proper format for the data layer. Using GNU Octave, I generate data (30X60000) uniform random draws, and labels (1X60000) and save as hdf5 train.hdf5, and do the same for a test set. When running the mnist.jl with this data, I get a size() error. It seems that the format Octave saves the data in is not what is required by async-hdf5-data.jl. The output follows. The network is the same as in the tutorial (except the output layer is square loss. The data files are changed, though, as described above. Any tips on how to create the proper format of files for a regression problem with G inputs and K outputs would be greatly appreciated.

julia> include("mnist.jl") WARNING: Method definition info(Any...) in module Base at util.jl:334 overwritten in module Logging at /home/michael/.julia/v0.4/Logging/src/Logging.jl:61. WARNING: Method definition warn(Any...) in module Base at util.jl:364 overwritten in module Logging at /home/michael/.julia/v0.4/Logging/src/Logging.jl:61. Configuring Mocha...

julia>

mcreel commented 8 years ago

I have noticed MemoryDataLayer() and the examples that use it. I think that should solve my problem