Multi task neural network in KNIME using custom loss function

In many cases, you'd have objective values being missing. That is, there are Yes and No values but also 'I don't know' values (hence null). But following the trend of neural network and deep learning, I wanted to do multi-task learning to see how well or not it performs.

 

One way to overcome this is to mask the null value by some other value and don't include it in the learning calcuatin (mask them). So here is what I did in KNIME

f:id:hateknime:20200607182612p:plain

 

This is very similar to my previous NN work flow but here is addition.

f:id:hateknime:20200607182637p:plain

mask the null value (? in knime) by -10

then made custom loss function like this.

f:id:hateknime:20200607182710p:plain

Very easy  but fun to see what happens. So I used toxicity database from MoleculeNet and found out that the data is very skewed so lots of NOs and few YESs hence not so much difference between non-multi-learning and multi-learning. Hmmm, really in need of good dataset but I guess real dataset will probaly do.

 

This was so much fun to test and see it actually works (no improvement, but learns at least). Wonder what happens in real and different datasets.

 

Also looking into conformal prediction lately. KNIME online seminar was owesome and they already have the nodes as well. Such a nice program.