Models: How computers make predictions

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

Computers can now analyze a player’s kick, during practice, and predict where that ball will go (hopefully through the goal posts). 

filo/ iStockphoto

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.

kick simulation
This screen shot shows part of the visual output coaches receive from a new computer model developed at the University of Texas at San Antonio. It analyzes a football kick. University of Texas at San Antonio
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 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.

Titan supercomputer
The Titan supercomputer at Oak Ridge National Laboratory near Knoxville, Tenn., is designed to do more than 20,000 trillion calculations per second. That ability is useful in running computer models of complex and dynamic systems, including Earth’s changing climate. Oak Ridge National Laboratory
“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.

sharing secrets and simulating networks
These friends share a secret at school. The virtual models are growing more sophisticated in their ability to simulate networks, whether they involve the links among students, towns or even the proteins in a cell. GlobalStock/ iStockphoto

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.

Computer modeling can help farmers forecast the effect of different variables on harvests of crops. These simulations can replace actual field tests. For example, mulch protects the taller corn plants, seen in the background of this image, from drought. Compare them to the stunted plants, in the foreground, grown without mulch. Keith Weller, USDA/ARS
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.”

Power Words

abstraction     An idea or concept, as opposed to a concrete example.

acceleration  The rate at which the speed or direction of something changes over time.

algorithm    A group of rules or procedures for solving a problem in a series of steps. Algorithms are used in mathematics and in computer programs for figuring out solutions.

biomechanical engineering     A field of research that combines biology and mechanical engineering to study things like how heat or fluids move through living organisms, how elastic and dynamic tissues or joints are, and which synthetic materials might substitute for natural structures that have active roles in the body (such as valves, joints and pumps. People who work in this field are known as biomechanical engineers.

biomechanist  A scientist who studies how living things move. For humans or other large animals, this might involve analyzing the forces exerted by muscles, tendons and gravity on an individual’s skeletal (or other supporting) structures.

calculus The branch of mathematics that studies change.

bacterium (plural bacteria)  A single-celled organism forming one of the three domains of life. These dwell nearly everywhere on Earth, from the bottom of the sea to inside animals.

centrality measures Scores that rank the importance of people or objects in a network.

communicability measures  Scores that rank the importance of links or connections in a network.

computer  An electronic device that processes information based on rules stored in the device.

computer model  A program that runs on a computer that creates a model, or simulation, of a real-world feature, phenomenon or event.

computer program  A set of instructions that a computer uses to perform some analysis or computation. The writing of these instructions is known as computer programming.

data  Facts and statistics collected together for analysis but not necessarily organized in a way that give them meaning. For digital information (the type stored by computers), those data typically are numbers stored in a binary code, portrayed as strings of zeros and ones.

doctoral degree  Also known as a PhD or doctorate, is an advanced degrees offered by universities — typically after five or six years of study — for work that creates new knowledge. People qualify to begin this type of graduate study only after having first completed a college degree (a program that typically takes four years of study).

drag    A slowing force exerted by air or other fluid surrounding a moving object.

ecosystem  A group of interacting living organisms — including microorganisms, plants and animals — and their physical environment within a particular climate. Examples include tropical reefs, rainforests, alpine meadows and polar tundra.

edge   (ln network mathematics) A connection or link between two people or things.

equation    In mathematics, the statement that two quantities are equal. In geometry, equations are often used to determine the shape of a curve or surface.

evolve  To change gradually over generations, or a long period of time. In living organisms, the evolution usually involves random changes to genes that will then be passed along to an individual’s offspring. Nonliving things may also be described as evolving if they change over time. For instance, the miniaturization of computers is sometimes described as their evolving to smaller, more complex devices.

food web   (also known as a food chain) The network of relationships among organisms sharing an ecosystem. Member organisms depend on others within this network as a source of food.

force  Some outside influence that can change the motion of a body or produce motion or stress in a stationary body.

friction  The resistance that one surface or object encounters when moving over or through another material (such as a fluid or a gas). Friction generally causes a heating, which can damage the surface of the materials rubbing against one another.

link  A connection between two people or things.

logarithm  The power (or exponent) to which one base number must be raised — multiplied by itself to produce another number. For instance, in the base 10, 10 must be multiplied by 10 to produce 100. So the logarithm of 100, in a base 10 system, is 2. In base 10, the logarithm of 1,000 would be 3, the log of 10,000 would be 4, and so on.

mass  A number that shows how much an object resists speeding up and slowing down — basically a measure of how much matter that object has.

network   A group of interconnected people or things.

Newton’s laws (of motion)  Three physical laws that together laid the foundation for classical mechanics. They describe the relationship between a body and the forces acting upon it, and a body’s motion in response to those forces.

node  A person or thing in a network.

physics  The scientific study of the nature and properties of matter and energy.

phytoplankton  Sometimes referred to as microalgae, these are microscopic plants and plant-like organisms that live in the ocean. Most float and reside in regions where sunlight filters down.

proteins  Compounds made from one or more long chains of amino acids. Proteins are an essential part of all living organisms. They form the basis of living cells, muscle and tissues; they also do the work inside cells.

sensor  A device that picks up information on physical or chemical conditions — such as temperature, force, deformation, barometric pressure, salinity, humidity, pH, light intensity or radiation — and stores or broadcasts that information.

simulate  (in computing) To try and imitate the conditions, functions or appearance of something. Computer programs that do this are referred to as simulations.

simulator    A device that attempts to mimic the form or function of something. A flight simulator, helps airline pilots practice flying from the safety of a cockpit on the ground. Computers display what the pilot would see on the dials and out of the windows in reaction to each action he or she takes.

software Programs that control how a computer works.

total communicability  One of several measures for ranking the importance of connections or links in a network.

variable  (in mathematics) A letter used in a mathematical expression that may take on more than one different value. (in experiments) A factor that can be changed, especially one allowed to change in a scientific experiment. For instance, when measuring how much insecticide it might take to kill a fly, researchers might change the dose or the age at which the insect is exposed. Both the dose and age would be variables in this experiment.

virtual  Being almost like something. Something that is virtually real would be almost true or real — but not quite. The term often is used to refer to something that has been modeled by or accomplished by a computer using numbers, not by using real-world parts. So a virtual motor would be one that could be seen on a computer screen and tested by computer programming (but it wouldn’t be a three-dimensional device made from metal).

Word Find (click here to enlarge for printing)

More Stories from Science News Explores on Computing