liveBook · Manning

Local averaging

Local averaging is a smoothing technique that replaces values with arithmetic means computed from nearby observations within successive or sliding windows.

How 7 Manning books explain it

Investing for Programmers

A moving average is a statistic that averages observations within a rolling time window to smooth short-term fluctuations.

How it is used
Uses rolling averages to smooth price charts, identify trends, and form technical trading signals.
How deep it goes
Explains rolling-window calculation, weighting choices, plotting, crossovers, and backtesting, but stops short of proving predictive effectiveness.
Examples
Demonstrates pandas calculations, NVIDIA historical prices, moving-average ribbons, SMA crossovers, and comparative historical backtests.
What you can do after
Build it from scratch with pandas, visualize multiple windows, and evaluate crossover rules through historical backtests including transaction costs.

Read how Investing for Programmers explains local averaging →

Statistics Every Programmer Needs

A moving average represents a time-series value or forecast using averages of observations in a moving time window.

How it is used
Uses moving averages to smooth time-series noise and expose trends or seasonal patterns for forecasting and decision-making.
How deep it goes
Defines the smoothing role and forecasting context but stops short of specifying a window formula, implementation, or parameter-selection procedure.
Examples
Uses stock closing prices, economic indicators, patient vital signs, web traffic, and train-test forecasting of Apple prices as examples.
What you can do after
Evaluate whether smoothing is suitable by examining time-series structure and comparing forecasts with held-out observations.

Read how Statistics Every Programmer Needs explains local averaging →

Inside Deep Learning: Math, Algorithms, Models

An image-smoothing transformation that averages local neighborhoods to reduce high-frequency detail before downsampling.

How it is used
Reduces high-frequency detail before downsampling and mitigates aliasing in pooling.
How deep it goes
Defines neighborhood averaging, demonstrates convolution kernels, and implements configurable multidimensional blurring.
Examples
Uses an MNIST digit, a 3×3 averaging kernel, and a BlurLayer after stride-one max pooling.
What you can do after
Builds image blurs with convolution and applies anti-aliased pooling through a configurable BlurLayer.

Read how Inside Deep Learning: Math, Algorithms, Models explains local averaging →

Natural Language Processing in Action, Second Edition

A moving average is an aggregate that summarizes recent values over a changing or weighted window of observations.

How it is used
Uses local averaging to extract short patterns from numeric sequences before learned CNN filters.
How deep it goes
Explains weighted sliding computation in pure Python and stops short of training or fitting the kernel.
Examples
Uses cryptocurrency prices, rainfall reports, Morse code, and a part-of-speech sequence from a quotation.
What you can do after
Apply it via pure Python to build a hardcoded detector for short sequence patterns.

Read how Natural Language Processing in Action, Second Edition explains local averaging →

Data-Driven Cybersecurity

A simple moving average is the arithmetic mean of observations within a fixed-length sliding window.

How it is used
Supports cybersecurity monitoring and feedback loops by revealing durable trends behind noisy incident metrics.
How deep it goes
Defines sliding-window averaging, demonstrates a five-day implementation and plot, but does not develop the underlying statistical theory.
Examples
Uses 30 simulated days of malware detections, five-day SMA and EMA calculations, plotted trends, and deviations flagged for investigation.
What you can do after
Evaluate cybersecurity trends, compare sustained movement with daily noise, and prioritize investigation of unusual deviations.

Read how Data-Driven Cybersecurity explains local averaging →

Demand Forecasting Best Practices

A moving average is a forecasting method that predicts a value by averaging observations from a recent fixed number of periods.

How it is used
Uses recent demand averages as a practical benchmark for judging forecasting accuracy and improvement.
How deep it goes
Explains window selection, lag alignment, overfitting safeguards, and ongoing comparison, but does not develop implementation details.
Examples
Uses three-to-six-period windows, past-sales comparisons, promotion-driven demand, and a six-month multi-team forecasting scenario.
What you can do after
Apply it to compare a forecast with past-sales demand and identify whether further planning improvement is warranted.

Read how Demand Forecasting Best Practices explains local averaging →

Math and Architectures of Deep Learning

A smoothing technique that reduces short-scale fluctuations by averaging nearby values in one dimension.

How it is used
Uses convolution to smooth signals and images, making broad patterns more visible by reducing local fluctuations and noise.
How deep it goes
Defines normalized uniform kernels, explains their averaging and low-pass behavior, and demonstrates fixed-weight PyTorch implementations in one and two dimensions.
Examples
Uses a three-value moving average, a fluctuating curve, and a salt-and-pepper-noisy text image as concrete demonstrations.
What you can do after
Apply it via PyTorch by configuring Conv1d or Conv2d with fixed uniform weights and correctly shaped tensors.

Read how Math and Architectures of Deep Learning explains local averaging →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.