TransWikia.com

Get layer types from Predict[trainingset, Method -> {"NeuralNetwork"}]

Mathematica Asked by Uwe Gotzes on November 27, 2020

I am using the Predict-Function with the NeuralNetwork-method on some training data. But I cannot figure out the characteristics of the NN that is built, especially not the layer types. How can I get more information about the NN?

One Answer

If you're on 12.1.1.0 then this works by peeking into the internals of PredictorFunction:

trainingData = {0.3 -> 0, 0.4 -> 0, 0.5 -> 1, 0.6 -> 1, 0.9 -> 1};
pf = Predict[trainingData, Method -> "NeuralNetwork"];
First[pf]["Model"]["Network"]

netgraph

All sorts of other properties are visible in the rat's nest of associations in First[pf].

We can go deeper and apply Normal to the NetGraph to see what specific functions are in the layers. As you can see it's all linear units and SELUs:

linear units and SELUs net graph

Correct answer by flinty on November 27, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP