Multi-target regression

I’m trying to predict some variables (angle and distance) from different input variables and data. If I understand correctly this is a multi target regression problem, am I right ? For the implementation should I start with the regression example of dl4j(addition example) and simply add 2 output values instead of one ?

In terms of network configuration, the only changes you need for multi-output regression are to the output layer.
For example an output layer configured for 10 outputs for multi-output regression would look like:

new OutputLayer.Builder().nOut(10).activation(Activation.IDENTITY)

Don’t forget about normalization for the inputs (features) and outputs (regression targets/labels) too (but that’s the same for single vs. multi-output regression)

1 Like

Thanks for the reply. I see Identity activation and mse loss function all the time, is this the way to go for regression ?

Identity+MSE is a good baseline approach for regression, yes.
In a few cases it might make sense to consider others - like identity+MAE if you know you have large outliers or noisy data - or tanh+MSE if your predictions are always bound to the [-1,1] range, for example. But otherwise identity+MSE should be fine for most cases.

1 Like