Summary of an article published on The Web Scraping Club on 2025-09-07 (free to read). Read the full article
Scraped datasets always contain odd values: a mistyped price, a sudden move in a stock, a page where the text is simply missing. Whether that value is noise or a signal depends on context, so you have to know your data before you pick a detection method. That holds for e-commerce and real estate prices, salaries in job posts, keyword spikes in news and social media, and stock data.
We start by separating anomalies from outliers and listing the three types: point, contextual and collective. Then we compare detection techniques, from plots and Z-score to clustering, Isolation Forest and ARIMA/SARIMA. The practical part scrapes NVIDIA’s price history from Yahoo Finance with Selenium and pandas, then runs Isolation Forest from scikit-learn on the closing price.
What’s inside
- Statistically an anomaly and an outlier are the same thing. What separates them is whether the deviation carries a real-world meaning, and only knowing the data tells you that.
- We look at the same NVIDIA price points on a 5-day, one-month and six-month chart to show how the timeframe changes what you would call anomalous.
- Missing content in scraped text is treated as an anomaly with two possible causes: the scraper failed, or the content is not in the source.
- We explain how Isolation Forest scores points by isolating them with random splits, and why the contamination parameter drives what gets flagged.
In the full article: The Selenium scraper and Isolation Forest scripts, the project structure, the anomaly plot on NVIDIA closing prices and the walkthrough of how the model’s parameters shape what it flags.