Hi Elemeo!



 elemeo:

self.out = torch.nn.Linear(25, 1)     # output layer

            testing_acc = torch.sum(pred == y)

my accuracy is always 0% because none of my predicted values match the labels.


You are testing for the exact equality of floating-point numbers.  In
general (except in cases of “special” values like 0.0) two floating-point
numbers, even if very nearly equal, are extremely unlikely to be exactly
equal.  Therefore it is expected that you never have a “correct” prediction
and that your computed accuracy is 0% (even if your predictions are
actually very good).


I figured that I wouldnt be able to predict the price with good accuracy (because if I could then I could beat the market I guess ?)


As an aside, it is true that predicting tradable market prices is a difficult
problem.  (To first approximation, the best prediction for today’s closing
price will be yesterday’s closing price.)  If you think about it, many
challenging neural-network problems – say, distinguishing cats from dogs
or localizing all of the instances of people in an image – are altogether
quite easy for people to do.  But ask yourself how easy it is for you to
predict today’s Bitcoin closing price (more accurately than just using
yesterday’s closing price) by looking at the time series up through
yesterday.  That should suggest that this could be quite hard for a neural
network, as well.
Best.
K. Frank