# Models: How computers make predictions

Whether you’re a team, teen or protein, there’s a virtual model for you

You line up a football to kick a field goal. Will you make it?

Success will depend on lots of things. Your distance from the goal post, the strength of your kick, your focus, and even the angle of your foot — all will affect the outcome. Even the wind will make a difference.

Each of these factors is known as a variable. That means each can vary, or change. Some variables also can affect each other.

If your kick depended on only one variable, you might be able to easily gauge your likelihood of propelling that ball through the goalposts. But as soon as multiple variables come into play, the human brain finds it harder and harder to calculate the outcome. Luckily, a new computer program can do the work, almost instantaneously.

It considers each variable involved in a kick. It then virtually adds the impacts of each to predict — or model — how things would turn out in the real world. Based on all of the calculations, it shows if you would have scored a field goal.

Such a *computer model* also could let you adjust the different variables and test how that might change the result. What if a wind gust kicks up? What if it’s raining and the extra moisture in the air adds a little extra drag — or friction — on the ball? The computer could rerun its calculations, changing each factor one by one or in various combinations.

Computer models are in use all around us. Some, like the new football model, focus on sports. Others examine questions about climate and farming. Still others deal with networks, those connections linking people and things. These models suggest who you might want to friend on social-media websites. They recommend news, movies or music online. They even help grocery stores keep popular snacks in stock.

Now, new research is leading to even more efficient computer models for studying certain types of networks. The results could help in developing new medicines, in saving ecosystems and even in solving crimes.

Here, we look at one way math is increasingly — and invisibly — influencing every part of our lives.

**Start with the real world**

People create models to represent some *real *thing. When children model people, buildings, cars or other things, they tend to use plastic, clay or other raw materials. Computers don’t. They model things out of numbers and mathematical relationships. Because their models are not physical — something, for instance, that you can touch — scientists refer to computer models as being *virtual* representations. They are constructed from data, math and computer programming. Although they exist only in a computer, they can help us understand how the real world works.

Think about a child’s model car. It can resemble a real car, right down to its bodywork and details. Now think about a computer model of a car. It wouldn’t look like a real car. But it could behave like one. The data and instructions fed into this model could reflect the most important properties of a real car. It might let engineers see how a real car would steer and brake, for instance.

“All computer models are based on some kind of abstraction,” explains Yusheng Feng. He is a biomechanical engineer at the University of Texas at San Antonio.

Computer modelers start with important features of something in the real world. In October 2013, Feng and his students introduced a new computer model for kicking an American-style football. The team started by watching real football players in action. They identified the different laws of physics involved when players kick. Then they expressed those laws using math.

For example, one of the laws of physics first expressed by Isaac Newton explains how force relates to a ball in motion. It says force equals mass times acceleration (F = m *x *a). Mathematical expressions, like this, which use numbers to relate two things that are equal, are known as *equations.* Other equations that Feng’s team used reflect the effects of the ball’s rotation, any wind and additional factors.

The University of Texas model works as part of a simulator. Kickers can use it to practice, over and over. As a player kicks a real ball, sensors and video cameras record and measure all the variables of that kick. The real ball lands in a net. In the model, however, the ball keeps going in virtual space.

The model reports back whether each kick would score or miss. More importantly, the model can tell the kicker what to do differently. The model can even flag any missteps that might lead to injury.

**Math, math and more math **

If Feng’s computer model sounds complicated, that’s because it is. In fact, one reason researchers use models is because the real world is so complex. Networks of people or things can be especially complex. The types and strength of relationships linking people are often changing. And the effects of even small changes may ripple throughout a whole network.

Suppose you wanted to model the friendships that exist among your classmates. You might draw a picture showing each student and the links that interconnect those people who name each other as friends.

Now imagine modeling the networks of friends in a large city. The huge numbers of people, plus all the links that connect them, would make it very hard to see any detail. Just tallying up everyone’s friendships would be a nightmare.

“If you have to do that a million times, it stops being feasible, even though it’s simple,” says Christine Klymko. She’s a mathematician who works on computer models at Lawrence Livermore National Laboratory in California. On the other hand, she notes, “Computers are perfect for going in and doing that sort of thing.”

Before a computer model can help make sense of the real world, it must have data. The people who make a model also must tell the computer what to do with those data. These experts do that with algorithms.

“An algorithm is just a series of instructions for how to do something,” explains Klymko. Those instructions tell the computer how to make decisions and when to do calculations. The instructions and the order they are to be performed will vary with different types of models.

For example, crop scientist Jon Lizaso works on virtual farming models at the Technical University of Madrid in Spain. His models can estimate the rate at which a crop will grow. They also predict how big a harvest of it some farmer might expect. Models rely on the known traits of particular crops, local weather conditions, soil types and other factors.

Lizaso’s computer models can quickly test what would happen if the conditions changed — without waiting for any actual crops to grow. That can save farmers time and money. Farmers could learn in advance how changes in weather, irrigation or the use of fertilizers should affect their harvests, for example.

Virtual farming can look decades into the future, too. Climate change will affect temperature and rainfall in many areas. Modeling can show how crops would respond to such changes.

“The math built into these models is rather simple — mostly addition, subtraction, multiplication and some logarithms,” explains Lizaso. (Logarithms express numbers as powers or exponents of other numbers. They help simplify calculations when working with very large numbers.) Even so, there’s still too much work for one person to do. “We are talking about probably thousands of equations,” he explains.

Solving even 2,000 equations would take a whole day at the rate of one equation every 45 seconds. And a single mistake might throw your answer way off.

More difficult math, such as calculus or advanced statistics, might take 10 minutes on average for each equation. Solving 1,000 equations could take nearly three weeks, if you took off some time to eat and sleep. Again, one mistake might throw everything off.

In contrast, common laptop computers can handle billions of operations per second. And in just one second, the Titan supercomputer at Oak Ridge National Laboratory in Tennessee can do more than 20,000 trillion calculations. (How much is 20,000 trillion? That many seconds would come to about 634 million years!)

**Testing, testing…**

Writing a computer model isn’t the end of the job. Researchers need to know if the model works.

Suppose you design a weather model. To test it, you might feed in real data from the previous year. If the model predicted snow for days that actually were hot and sunny, something’s definitely wrong. You’d have to go back and tinker with the model.

A model also should be reliable. “You don’t want it to just work one time,” stresses Klymko. Researchers might have models run calculations thousands or even millions of times to make sure they work.

Computer modeling is also “an evolving concept,” says Lizaso. Computer models for farming first came out in the late 1970s. Since then, scientists have learned more about crop science, climate change and other factors. “The idea is to improve existing models and add additional properties so they can perform better,” he says.

**Networking tools**

Computer modelers rarely start from scratch. For the football-kicking model, Feng’s group used the laws of motion that Newton came up with more than 300 years ago. They also include other knowledge about physics — the scientific study of energy and matter.

In fact, common tools can help in computer modeling for many fields. Examples include the way news spreads among groups of friends and the way species might interact in a food web. Both are examples of networks. Each has central players. Each also relies on links that connect things.

“You can model so many things using the same basic model of objects and connections,” says Klymko. She focuses on how to better study networks.

“My research,” she explains, “is about how to take the notion of importance and how to construct it mathematically.” And, she adds, you need to figure out “how to estimate it quickly.” Klymko did the research for her doctoral degree at Emory University in Atlanta, Ga.

Researchers often want to know who or what is most important in a network. Think about whom you would talk to if you wanted to spread news quickly through your class or school. To decide that, computer models use scores called *centrality measures*. These might identify not only which classmates in the network would be central players, but also the people closest to them.

Researchers also want to identify critical connections. Different links join individuals within a network. However, only some of those links may be needed to make sure that any tidbit of news spreads quickly and efficiently. It even may just come down to one linked pair. “If those two people stopped talking to each other, gossip wouldn’t spread as well,” explains Klymko. Computer models rank those links with scores called *communicability measures*.

Klymko’s research used data from work people had done on different networks. One of those networks dealt with interactions among the members of a karate club. A second network involved links among the proteins in yeast cells. Still another model had data on the different routes that connect various Minnesota towns.

Within a network, each person or thing being linked is called a node. Connections that join nodes are called links or edges. Klymko found that one score that measures the importance of links comes very close to another score that ranks the importance of nodes. In that instance, modelers can use the links score in place of the node score.

One advantage to doing that: Computers can estimate the links scores faster than the ones for nodes. Also, the estimates for the links scores come very close to the actual scores. This points to another advantage in having computers model what happens in networks.

Klymko also looked at different ways to measure whether someone (or something) is more important on a small scale or on a large scale. Think about the difference between a teacher and a school superintendent. The first is most important to an individual classroom. The second is the key decisionmaker for an entire school district. Klymko’s work suggests how researchers can decide which scope makes the most sense for answering the problem that a computer will try to model.

And her findings can help solve real-world problems. A computer might model a bacterium that causes disease. It would identify the most important proteins made by that germ, and the links between those proteins — or nodes — within the bacterial cell. Researchers might then design drugs to destroy those proteins or links.

A computer model also might identify key species in an ecosystem. Without a few species, other living things might not thrive. For instance, many small fish — the food for larger fish — graze on tiny phytoplankton. Kill off those phytoplankton and the Arctic food web would collapse. Identifying such linkages can help focus efforts to protect ecosystems.

Computer models even can help fight crime. Identifying and finding the critical people or links in a network could help break up criminal organizations that deal in drugs or weapons.

The better computer models are, the more researchers can use them to understand the real world. For Klymko and other researchers, that means asking: “How can I express this in math?”

Ultimately, computer modeling is about much more than numbers and the math applied to them, stresses Klymko. It’s “about how you actually think about the way things interact.”