Answer the question
In order to leave comments, you need to log in
TensorFlow How to predict corresponding numbers?
What should be the code for predicting an approximate corresponding value for a given number?
For example: 1 corresponds to 1, 2 -> 4, 3 -> 9, 4 -> ?
Or 1->1, 1->2, 2->99, 2->101, 3->1000, 4->?
Answer the question
In order to leave comments, you need to log in
Well, obviously - something like this:
- collect a training sample that, in your opinion, will well describe the function that needs to be predicted. And at the same time - quite large (well, for example, 10 times more than it is planned to have weights for the trained network).
- divide the sample into training and test parts (randomly). For example, in the ratio 0.7-0.3 (70% for the training part, 30% for the test part)
- choose the error function that suits your case. MSE, for example (mean squared error).
- repeat until an acceptable error level is reached on the test sample:
- select the ANN configuration (number/types of layers, their activation functions)
-- for a pre-selected number of epochs - train the ANN on the training sample (read - minimize the value of the error function. By the way, the question is which optimizer to choose).
-- evaluate the error on the test set.
And here is the code - with this already on fl/upwork/etc :-)
ps haven't fiddled with tensorflow specifically, but it seems it shouldn't be a problem to figure out any of the steps above once you have the algorithm, isn't it :-) ?
How to predict the corresponding numbers?
to collect a training sample :)
there is a thin line between overtraining and misunderstanding of the neuro-shell :) the
neuro-mesh cannot reliably predict the future when it comes to lotteries :)
because it doesn’t have the understanding of the whole brain,
but there are certainly methods of forecasting,
but for not understanding them for a long 9 years
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question