Doctor Sigmund Freud was a highly noted Human psychologist in the 19th and 20th century. Some of his writings included Totem and Taboo, Three Contributions to the Theory of Sex, The Interpretation of Dreams, and The Problem of Anxiety. (TNG: "The Big Goodbye")
Data began visiting Freud in the holodeck for a psychoanalysis in 2370, after having nightmares about workers ripping up the USS Enterprise-D and attacking him. He later had nightmares about the crew and bizarre things that were happening to them; in one of those Freud was killed by the workers.
Freud diagnosed Data as a classic polymorphous perverse, who for example desired to possess his own mother. As Data had no mother, Freud was no help to Data, who later saw Deanna Troi in a counseling session, where she gave him a different analysis and said, "next time see me before you see Sigmund." Troi also told Data that even Freud did not interpret everything as "sometimes a cigar is just a cigar." (TNG: "Phantasms")