Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Multi-output regression and classification #6

Closed
ilblackdragon opened this issue Nov 23, 2015 · 7 comments
Closed

Multi-output regression and classification #6

ilblackdragon opened this issue Nov 23, 2015 · 7 comments
Milestone

Comments

@ilblackdragon
Copy link
Contributor

There are number of problems that require multiple outputs (including RNNs).
Support needs to be added across all models and data feeders.

@boscotsang
Copy link

Do you mean output an m by n matrix which m is the number of samples and n is the output which is used as multi classes classifications or feed into the next layer?

@ilblackdragon
Copy link
Contributor Author

This specific issue is for multi-output classification and multi-output regressions (vs multi class, where there can be multiple classes for the same output).
As of #e443c73 there is multi output regression support, but still need mutli output classification support (especially for cases like decoder in RNN for words/characters).

The multi class case also may need some work. If you are interested into checking it out, I would start with trying to add an example to the examples folder and see what breaks.

@boscotsang
Copy link

For multiclass classification we can infer the number of class from the number of unique labels. Then we can transform the label to one hot code representing the class. Therefore we don't need to specify the number for class so the output_shape can be specified by the shape of y. By this way the output of binary or multi regression and classification can be represented by a tensor that the first axis is the number of batch_size and the last size is the number of output. How you do think about it?

@ilblackdragon
Copy link
Contributor Author

This is actually works. Multioutput regressions are implemented. Multiclass classification works. Multioutput (multiclass) classification works as well - see example language modelling / neural translation.

@waleedka
Copy link

@ilblackdragon I've been searching for the multi-output sample you mentioned but I can't seem to find it. I checked the language modeling neural translation examples, but as far as I can tell, they're not using multi-output classification. I'm sure I'm missing something.

My understanding of multi-output classification is when you there are several outputs and each output can have multiple classes. For example, a model that takes pictures of animals in the wild and generates two outputs: (1) the animal type (cat, dot, bird, ...etc.) and (2) the weather in the image (sunny, cloudy, raining, ...etc.). Am I correct that this is what we refer to as multi-output? And if so, does skflow support it?

@wazzy
Copy link

wazzy commented May 18, 2016

For multi-output in RNN text classifier I am getting below error
File "build/bdist.linux-x86_64/egg/skflow/estimators/base.py", line 310, in predict return self._predict(X, axis=axis, batch_size=batch_size) File "build/bdist.linux-x86_64/egg/skflow/estimators/base.py", line 285, in _predict preds.append(predictions_for_batch.argmax(axis=axis)) ValueError: axis(=2) out of bounds

@terrytangyuan
Copy link
Member

Please discuss this in StackOverflow since this is a usage question. This repo will be removed soon so you should ask question on TensorFlow's main repo. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants