ML icon indicating copy to clipboard operation
ML copied to clipboard

Does Rubix ML support multi-dimensional output?

Open epoxa opened this issue 3 years ago • 4 comments

I would like to utilize MLPRegressor to predict multi-dimensional continuous vectors (arrays). Is it possible? As I see train and partial methods require Labeled datasets, so what should I use as labels? Thanks.

epoxa avatar Aug 14 '22 16:08 epoxa

You are correct. From the classifiers we have, the NeuralNet should trivially support multiple outputs for regression but it is currently capt at one in \Rubix\ML\NeuralNet\Layers\Continuous

Even if that capt is removed, Rubix\ML\Datasets\Labeled as you mention cannot take multi values. Allowing for the labels to be arrays will need changes in Continuous back and gradient but once you get gradient, the rest of the code will stay the same. Feel like trying it yourself? Would love to hear whether it works or if you find any further issues.

DrDub avatar Sep 05 '22 02:09 DrDub

Actually, I needed this for reinforcement learning and programmed it myself. Give it a try: https://github.com/Textualization/ML/blob/rl/src/NeuralNet/Layers/MultiContinuous.php

DrDub avatar Sep 07 '22 15:09 DrDub

We could allow a new "list" datatype in the Dataset object to accommodate multi-label problems. We could also implement a new "MultiOutput" layer.

andrewdalpino avatar Sep 14 '22 21:09 andrewdalpino

We could allow a new "list" datatype in the Dataset object to accommodate multi-label problems. We could also implement a new "MultiOutput" layer.

Well, I did implement that MultiOuput layer already. It is in my fork. But without a Dataset extension, it can only be accessed by fiddling with the neural network directly.

DrDub avatar Dec 29 '22 12:12 DrDub