Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Data Forecasting and Segmentation Using Microsoft Excel

You're reading from   Data Forecasting and Segmentation Using Microsoft Excel Perform data grouping, linear predictions, and time series machine learning statistics without using code

Arrow left icon
Product type Paperback
Published in May 2022
Publisher Packt
ISBN-13 9781803247731
Length 324 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Fernando Roque Fernando Roque
Author Profile Icon Fernando Roque
Fernando Roque
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Part 1 – An Introduction to Machine Learning Functions
2. Chapter 1: Understanding Data Segmentation FREE CHAPTER 3. Chapter 2: Applying Linear Regression 4. Chapter 3: What is Time Series? 5. Part 2 – Grouping Data to Find Segments and Outliers
6. Chapter 4: Introduction to Data Grouping 7. Chapter 5: Finding the Optimal Number of Single Variable Groups 8. Chapter 6: Finding the Optimal Number of Multi-Variable Groups 9. Chapter 7: Analyzing Outliers for Data Anomalies 10. Part 3 – Simple and Multiple Linear Regression Analysis
11. Chapter 8: Finding the Relationship between Variables 12. Chapter 9: Building, Training, and Validating a Linear Model 13. Chapter 10: Building, Training, and Validating a Multiple Regression Model 14. Part 4 – Predicting Values with Time Series
15. Chapter 11: Testing Data for Time Series Compliance 16. Chapter 12: Working with Time Series Using the Centered Moving Average and a Trending Component 17. Chapter 13: Training, Validating, and Running the Model 18. Other Books You May Enjoy

Chapter 1: Understanding Data Segmentation

Machine learning has two types of algorithms depending on the level of adjustments that you require to give a response:

  • Supervised
  • Unsupervised

Supervised algorithms need continuous improvement in the form of the data used to train them. For example, a supervised machine learning function of a linear model needs a starter group of data to train and generate the initial conditions. Then, we have to test the model and use it. We need continuous surveillance of the results to interpret whether they make sense or not. If the model fails, we probably need to train the model again.

Unsupervised algorithms do not require any previous knowledge of the data. The unsupervised machine learning process takes data and starts analyzing it until it reaches a result. Contrary to supervised linear regression and time series, this data does not need a test to see whether it is useful to build a model. That is the case with the K-means algorithm, which takes unknown and untested data to classify the values of the variables and returns the classification segments.

In this book, we will cover three different topics of machine learning:

  • Grouping statistics to find data segments
  • Linear regression
  • Time series

For grouping statistics, we will use an add-on for Excel that will do the classification automatically for us. This add-on is included with the book, and we will learn how to use it throughout this book. For linear regression, we will use Excel formulas to find out whetherthe data can be used to make predictions with regression models and forecasts from the time series.

We need a machine learning algorithm to classify and group data for the following reasons:

  • A large amount of data is difficult to classify manually.
  • Segmentation by observing a 2D or 3D chart is not accurate.
  • Segmenting multiple variables is impossible because it is not possible to do a chart of multiple dimensions.

Before we do group segmentation using K-means clustering, we need to find the optimal number of groups for our data. The reason for this is that we want compact groups with points close to the average value of the group. It is not a good practice to have scattered points that do not belong to any group and that could be outliers that do not perform like the rest of the data, as they could be anomalies that deserve further research.

The K-means function will also help to get the optimal number of groups for our data. The best-case scenario is to have compact groups with points near their center.

We will review the basic statistical concepts to work with data grouping. These concepts are as follows:

  • Mean
  • Standard deviation

In the data grouping segment, the mean is the center, or centroid, of the group. The best case is that the values are compact and close to the segment's centroid.

The level of separation of the values within a group from its centroid is measured by the standard deviation. The best case is to have compact groups with values close to the group's mean point with a low standard deviation for each group.

When we have values and segments that are scattered with a large standard deviation, that means they are outliers. Outliers are data that behaves differently from the majority of other segments. It is a special kind of data because it requires further research. Outliers could indicate an anomaly that could grow and cause a problem in the future. Practical examples of outliers that require attention are as follows:

  • Values that are different from the normal transaction amounts in sales and purchases. These could indicate a system test that could lead to a bigger issue in the future.
  • A timeline of suspicious system performance. This could indicate hacking attempts.

In this chapter, we will cover the following topics:

  • Segmenting data concepts
  • Grouping data in segments of two and three variables
You have been reading a chapter from
Data Forecasting and Segmentation Using Microsoft Excel
Published in: May 2022
Publisher: Packt
ISBN-13: 9781803247731
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime