I don't know if the movie is based on them, but there really
have been some psychopaths similar to the ones portrayed in
the movie.
Hopefully, the movie (being brought to the screen by Leonardio DiCaprio) will combine the atmosphere of Ragtime with the historical prototype of Hannibal Lecter in the person of H H Holmes.
(Arguably, the other Lecter prototype would be Holmes' contemporary, Jack the Ripper.)