TMultiLayerPerceptron with trees made from complex objects

Before I start writing large chunks of code that might not work I was wondering, will the TMultiLayerPerceptron work with trees made from user defined objects? I haven’t seen an example of this, do I just set the input char string as the values I’d use in SetBranchAddress after SetMakeClass=1 (or an expression invloving them as I discovered in my last question here)? Plus do I have to SetBranchAddresses before creating the TMultiLayerPerceptron object, or is it all done internally?

Thanks in advance


Hi Chris,

If you leave the tree’s split level at 99 you can specify “branch.myobj.mymember.yetanother.somefloat” (i.e. yes, just like with SetMakeClass=1). No need to set branch addresses.

By the way, I tested the “node name as formula” on tutorials/mlpRegression.C, replacing “x,y:10:8:f” with “x,y:10:8:sin((1.7+x)(x-0.3)-2.3(y+0.7))” (i.e. the value of f). That works nicely. Due to “:” being the delimiter for neuron layers you cannot used functions in namespaces, though (like TMath::Sin).


Thanks yet again. I’ve now gone back to forming a seperate tree since unfortunately my expressions became too complicated.