CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Regression

Open tourniquet555 opened this issue 10 years ago • 5 comments

I'm having trouble getting a simple regression working properly. The .cntk file and training data are below, configured to write out the labels and features when run with command="Basic_Regression_Output". The details of the CN aren't important, just the loading of the "labels".

The resulting output file BasicRegressionOutput.features looks like what I expected (the first two columns of the three column training data, 5000 rows), but the BasicRegressionOutput.labels file (which I expect to be the third column of the training data, 5000 rows) contains just three zeroes.

If someone can point out what I'm doing wrong, I'd greatly appreciate it.

THE .cntk config file:

https://gist.github.com/tourniquet555/224407efb59f33b70d73

The training/testing data:

https://gist.github.com/tourniquet555/bef851d7600d66ab329c

The output features (RIGHT)

https://gist.github.com/tourniquet555/c0a547f27bb85c55e110

The output labels (WRONG?) https://gist.github.com/tourniquet555/ca5aca4ecca75fe62ea1

tourniquet555 avatar Feb 15 '16 22:02 tourniquet555

Has anyone successfully used CNTK for regression yet?

tourniquet555 avatar Feb 19 '16 21:02 tourniquet555

I also have the same question. Is there someone can tell me how to set the labelDim and labelMappingFile. An example would be the best solution . Thanks a lot.

1132520084 avatar Mar 11 '16 14:03 1132520084

Hi @tourniquet555

I, too, have been looking to implement a simple regression example and I think I have stumbled across something. Here are my tweaked files from your examples. Hopefully, this is useful.

BasicRegression.zip

I think you are outputting the wrong nodes to get the values you want. I have also found that the network topology is too complex and over-fits on your training data. I have a very simple network topology that seems to give the correct results. For regression, labelDim and labelMappingFile shouldn't be specified.

srex212 avatar May 12 '16 17:05 srex212

@srex212 My humble like.

KolyaIvankov avatar Jul 06 '16 15:07 KolyaIvankov

We have an example for a simple regression problem in our repo now at https://github.com/Microsoft/CNTK/tree/master/Examples/Image/Regression. Thanks.

pkranen avatar Jul 07 '17 09:07 pkranen