How to define the good neurals and layers using tabular?

How to define the neurals and layers using tabular?
How to design a suitable network?
learn = tabular_learner(data, layers=[200,100,100,20], metrics=accuracy)

I don’t understand how to get the value of the layers.

1 Like

I’ve using this equation in my university research I’ve been doing this semester with decent results:

Input neurons = # of total classes/variables we are using
Output neurons is our total categories we have an option in predicting (eg. if we are classifying dogs and cats it would be 2)

Alpha I have been using 5, seems to work well, but everyone’s dataset plays a little differently. It originated from here:

1 Like

If I use tabular to predict the value such as price or quantity. How to set the number of output neurons?

Is that means we needn’t set more than 3 layers?

If I have 1 million records with 100 features to predict a float value ranging from 0.0 to 100000.0, which shape the network will be?
1000=1 million / 10* (100+1)
10=root 100 x 1

If you’re trying to follow the above, I start by having the general fastai defaults tell me what they are by generating a model and passing in an empty array under ‘layers’, and then viewing ‘learn.model’. Now my inputs and outputs of the linear layer are my neuron amounts, and then I found that with most problems, splitting it into 2 hidden layers worked enough.