Isaac Asimov imagined ‘psychohistory’ as a possible science of dreams. When he coined the term he anticipated the possibility that a science capable of perceiving larger patterns of events could eventually evolve.
Asimov came to this idea precisely from comparing patterns in history, and he shared with Terry Gross on her National Public Radio program, Fresh Air  on September 25, 1987 how this possibility appeared to him from such a process.
During the interview Gross asked Asimov about the origins of the idea of ‘psychohistory’:
Gross: “What did you have in mind when you coined the term and the concept?”
Asimov: “Well, I wanted to write a short story about the fall of the Galactic Empire. I had just finished reading the Decline and Fall of the Roman Empire [for] the second time, and I thought I might as well adapt it on a much larger scale to the Galactic Empire and get a story out of it. And my editor John Campbell was much taken with the idea, and said he didn’t want it wasted on a short story. He wanted an open-ended series so it lasts forever, perhaps. And so I started doing that. In order to keep the story going from story to story, I was essentially writing future history, and I had to make it sufficiently different from modern history to give it that science fictional touch. And so I assumed that the time would come when there would be a science in which things could be predicted on a probabilistic or statistical basis.”
Gross: “Do you think that would be good if there really was such a science?”
Asimov: “Well, I can’t help but think it would be good, except that in my stories, I always have opposing views. In other words, people argue all possible… all possible… ways of looking at psychohistory and deciding whether it is good or bad. So you can’t really tell. I happen to feel sort of on the optimistic side. I think if we can somehow get across some of the problems that face us now, humanity has a glorious future, and that if we could use the tenets of psychohistory to guide ourselves we might avoid a great many troubles. But on the other hand, it might create troubles. It’s impossible to tell in advance.”
‘Psychohistory‘ was a product of the great intuition and imagination of Isaac Asimov. In the way he imagined it may very well belong to science fiction. But similarly to how Jules Verne’s imagined science fiction of space travel became real within a 100 years, some version of Asimov’s patterns with a basis in the human psyche seem very possible today.