Ultralytics YOLO27: Join the waitlist.
License YOLO
Back to Ultralytics Glossary

Predictive Modeling

Predictive modeling trains models on historical data to estimate unknown or future outcomes. The workflow, model types, evaluation, uses, and code.

Predictive modeling is the process of building a statistical or machine learning model from historical data to estimate an outcome that is unknown or has not happened yet, such as whether a customer will cancel, how much a store will sell next week, or whether a scan shows disease. The model learns how input features relate to a known outcome in past examples, a form of supervised learning, then applies that relationship to new cases, often returning a probability or a range along with the prediction. Predictive analytics is the business practice of applying these models to decisions in marketing, finance, operations, and healthcare, and it sits between descriptive analytics, which summarizes what happened, and prescriptive analytics, which recommends what to do about it.

The Predictive Modeling Workflow#

A project starts by defining the target and the decision it will inform, then assembles historical examples whose inputs were known at the moment the prediction would have been made. Feature engineering turns raw records into model inputs, and the data is split into training, validation, and test sets. Forecasting problems split by time so that the model is always evaluated on periods later than the ones it learned from; a random split there, or any feature that encodes the answer, causes data leakage and inflated scores. Candidate models are compared against a simple baseline on held-out data, and after deployment the model is watched for data drift, because the relationships it learned weaken as the world changes.

Evaluation uses metrics that match the decision: precision, recall, and the area under the ROC curve for classifiers, and mean absolute error (MAE) or root mean squared error for numeric predictions. Cross-validation estimates performance on small datasets by averaging over several train-test splits. This example uses scikit-learn to predict diabetes progression one year after a patient's baseline measurements, comparing two models with a baseline that always predicts the average:

from sklearn.datasets import load_diabetes
from sklearn.dummy import DummyRegressor
from sklearn.ensemble import HistGradientBoostingRegressor
from sklearn.linear_model import Ridge
from sklearn.model_selection import cross_val_score

# 442 patients: 10 baseline measurements and disease progression one year later
X, y = load_diabetes(return_X_y=True)

models = {
    "Baseline (always predict the mean)": DummyRegressor(),
    "Ridge regression": Ridge(alpha=0.1),
    "Gradient-boosted trees": HistGradientBoostingRegressor(max_depth=3, random_state=0),
}
for name, model in models.items():
    # Mean absolute error on held-out folds of 5-fold cross-validation
    scores = cross_val_score(model, X, y, cv=5, scoring="neg_mean_absolute_error")
    print(f"{name}: MAE {-scores.mean():.1f}")

The baseline misses by 66.0 points of the progression score on average, ridge regression by 44.6, and gradient-boosted trees by 46.5, so both models cut the error by about a third, and on these 442 patients the simpler linear model is the more accurate one.

Types of Predictive Models#

Predictive models differ by the outcome they estimate. Classification models, such as logistic regression and decision trees, predict a category and usually its probability. Regression models, such as linear regression, predict a number. Forecasting models for time series predict future values of a sequence from its own past, seasonality, and external drivers, and survival models predict the time until an event such as a machine failure, including cases where the event has not happened yet. For tabular data the usual algorithms are regularized linear models and tree ensembles such as random forests and XGBoost, while neural networks dominate on images, audio, and text, and tabular foundation models predict on new tables without training a model per dataset.

Predictive Modeling in Computer Vision#

Vision models are predictive models whose inputs are pixels. YOLO26 in predict mode returns, for each object it finds in an image, a predicted class, a confidence score, and box coordinates, and object counts derived from those predictions often become input features for downstream forecasts, such as hourly foot traffic for staffing.

Applications#

  • Predictive maintenance: Models trained on vibration, temperature, and runtime data estimate when a component will fail, so repairs happen before a breakdown instead of on a fixed schedule.
  • Healthcare: Risk models estimate the chance of hospital readmission or sepsis from patient records, and imaging models flag likely findings for radiologists to review first.
  • Credit and fraud scoring: Banks predict the probability that a borrower defaults or that a card transaction is fraudulent, and score each card transaction in real time as it is authorized.
  • Demand and inventory planning: Retailers forecast sales per store and product from history, prices, promotions, and holidays to decide how much stock to order.
  • Data mining: Searches large datasets for patterns, clusters, and associations, with or without a target to predict, while predictive modeling always estimates a specific outcome.
  • Generative AI: Models the distribution of the data itself to create new text, images, or audio, while a predictive model maps an input to a target value.
  • Causal inference: Estimates what happens when someone intervenes, which a predictive model cannot answer from correlations alone. A model trained on 1990s pneumonia records learned that patients with asthma had a lower risk of dying, because those patients were usually admitted straight to intensive care, and acting on that prediction could have sent high-risk patients home.

Explore solutions

Computer vision in sports

Computer vision in sports

Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Turn drone and aerial imagery into real-time insights for agriculture, aquaculture, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Apply computer vision in aerospace with Ultralytics YOLO for aircraft inspection, runway FOD detection, airport ground operations, and composite defect detection.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning