Should I compare my proposed work with my implementation of the previous related papers or the reported result? In computer science, I need to compare the accuracy of my proposed method to the previous ones. There are two possible options:


Implement the methods described in related papers on my own machine
Use the claimed results of the authors


Sometimes, when I implement the other papers, the results are different from the claimed ones, because of a lack of details, parameters and hyperparameters. What is the correct decision? Should I compare my work with the implemented one?
In addition, sometimes the reports of the previous works are on a different dataset and I have to implement the code. Is it the correct way?
I'd say, as a rule you just rely on the results provided by the authors of the papers you cite. You aren't really supposed to reimplement their algorithm just to confirm their results. 

Let's dive a bit deeper, especially from a reviewer's point of view. When a reviewer sees that your method in a certain way superior to a previously published work, this is exactly what is expected, so everyone is happy. If you can't prove that your method is better because you use a different dataset, it's quite a problem (for both you and the reviewer), and in general case it would be very advisable to get the same data. Perhaps, this is the first step to take.

If you can't get the same dataset and try to reimplement the algorithm, of course it opens the whole can of worms, since the reviewer might rightfully presume that your implementation is somehow different (due to different parameters or possible bugs) and thus incomparable. I'd say that a common valid scenario for such a venture is when you doubt the original paper's conclusions and want to confirm or disprove them.

As a side note, I think one should decide on the evaluation strategy before designing and implementing own methods. If you want to advance the state of the art, it's reasonable to check the existing papers first and make sure that you can get the same dataset as their authors to show that your method is more accurate on the same data.