I need to estimate the value of a one numeric variable from the values 8 numeric variables

y = f(x_1, ..., x_8).

I have an historical dataset where I can relate thousands of y values to the corresponding x, that will grow with time potentially to millions of records.

Of course I don't know the relationship between x and y, for sure I know it is not linear with x (I'm guessing y depends quadratically on some xs) and in principles it could be that there is no analytical expression at all for this relationship.

For these reasons I guessed to solve the problem with a Neural Network but I'm pretty new to this topic so I'm trying to figure out (with very little success) which model should be suitable for my problem, i.e. how many hidden layers to choose and how many neurons for each layer? Should I put ReLUs or other functions between layers?

Of course I'm not interested just in solving this particular situation but in understanding the possible choice criterias!

Also I would be interested in this: if I know that y probably depends on combinations or functions of the x_i such as y = f(x_1 - x_2, x_3**2, ..., x_8) should I put directly those guesses as inputs in the net or plain x_8s?

If it's useful in any way, I'm pretty familiar with python and I would like to implement this solution with PyTorch for my personal learning benefit. An hint for the Model class structure would be most appreciated.

Thank you


1 Answer 1


How much data do you have? this is a regression problem that doesn't require using neural networks, you can solve this by using much simpler algorithms ( SVM, Linear Regression , Tree-based regressors ) ( I'm assuming you don't have millions of rows of data ). As in for the inputs, you can either use the numeric variables x1 to x8 or create some other variables based on those depending on which is more correlated with y. It is the algorithm's mission to go through your data and come up with a function that gives you a y for your X .

  • $\begingroup$ The training dataset will improve with time, potentially to millions of records; at the moment is of the order of thousends records $\endgroup$ Jul 19, 2019 at 11:13
  • $\begingroup$ the relation between y and x_i is not linear, why you suggested linear regression methods? $\endgroup$ Jul 19, 2019 at 11:16
  • $\begingroup$ your assumption of non-linearity can be not as significant as you think, and a linear model can give you good results on your data. $\endgroup$
    – Blenz
    Jul 19, 2019 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.