When is a workplace at its happiest? I would submit that it is during the early stages of a project that is succeeding, whether it is a restaurant, an internet startup or a laboratory making phenomenal progress in its field of inquiry.

There is a sustained ebullience in a lab when the researchers know they are pushing back the frontiers of science, opening vistas of human possibility and reaping the extraordinary rewards that accompany just learning something big.

There has been a special euphoria in science ever since Archimedes jumped out of his bath in ancient Greece, supposedly shouting, “Eureka!”

I sensed this excitement when interviewing two exceptional scientists, Marina Sirota and Alice Tang, at the University of California San Francisco (UCSF) for the independent PBS television program “White House Chronicle.”

Sirota and Tang have published a seminal paper on the early detection of Alzheimer’s disease — as much as 10 years before onset — with machine learning and artificial intelligence. The researchers were hugely excited by their findings and what their line of research will do for the early detection and avoidance of complex diseases like Alzheimer’s and many more.

It excited me — as someone who has been worried about the effect of AI on everything, from the integrity of elections to the loss of jobs — because the research at UCSF offers a clear example of the strides in medicine unfolding through computational science. “This time it’s different,” said Omar Hatamleh, who heads up AI for NASA at the Goddard Space Flight Center in Greenbelt, Md.

Human expectations are being revolutionized in laboratories like the one in San Francisco.

Sirota said, “At my lab … the idea is to use both molecular data and clinical data (which is what you generate when you visit your doctor) and apply machine learning and artificial intelligence.”

Tang, who just finished her Ph.D. and is studying to be a medical doctor, explained, “It is the combination of diseases that allows our model to predict onset.”

In their study, Sirota and Tang found that osteoporosis is predictive of Alzheimer’s in women, highlighting the interplay between bone health and dementia risk.

The researchers used this approach to find predictive patterns from 5 million clinical patient records held by UCSF in its database. From these, there emerged a relationship between osteoporosis and Alzheimer’s, especially in women. This is important as two-thirds of Alzheimer’s sufferers are women.

The researchers cautioned that it isn’t axiomatic that osteoporosis leads to Alzheimer’s, but it is true in about 70 percent of cases. Also, they said they are critically aware of historical bias in available data — for example, that most of it is from White people in a particular socioeconomic class.

Sirota and Tang said there are contributory factors they found in Alzheimer’s. These include hypertension, vitamin D deficiency and heightened cholesterol. In men, erectile dysfunction and enlarged prostate are also predictive. These findings were published in “Nature Aging” early this year.

Predictive analysis has potential applications for many diseases. It will be possible to detect them well before onset and, therefore, to develop therapies.

This predictive analysis has been used to anticipate homelessness so that intervention — like rent assistance — can be applied before a family is thrown out on the street. Institutional charity is usually slow and often identifies at-risk people after a catastrophe.

AI is beginning to influence many aspects of our lives, from telephoning a banker to utilities’ efforts to spot and control at-risk vegetation before a spark ignites a wildfire.

While the challenges of AI, from its wrongful use by authoritarian rulers and its menace in war and social control, are real, the uses just in medicine are awesome.

In medicine, it is the beginning of a new time in human health, as the frontiers of disease are understood and pushed back as never before. Eureka! Eureka! Eureka!