# The Time Whisperer — LARS Algorithm

## Using LARS to Analyze Time Series

Machine learning englobes a wide array of different algorithms that are able to perform tasks such as regression and classification. It is always interesting to have at least a basic idea of these algorithms. This article presents the LARS algorithm and shows how to code it in hopes of predicting inflation numbers.

# What is Least Angle Regression (LARS)?

*Least Angle Regression* (LARS) is a technique used in statistics and machine learning for fitting linear regression models. It’s particularly useful when dealing with datasets where the number of predictors (features) is large compared to the number of observations. In simple terms, it helps us find which predictors are most important in explaining the variation in the outcome variable.

✨

Important noteIn other words, if you are using lagged values to estimate future values, make sure you use a bunch of lagged values (for example, using the latest 500 returns of the S&P 500 to predict the next return).

Imagine you have a bunch of predictors (like age, income, and education level), and you want to predict something (like house price). LARS helps you figure out which predictors are important and how they contribute to predicting…