Sunday, November 30, 2025

5 Excel AI Classes I Discovered the Exhausting Method


5 Excel AI Lessons I Learned the Hard Way
Picture by Editor

 

Introduction

 
For a lot of organizations, notably these in regulated industries or with restricted technical infrastructure, Excel and its XLMiner add-in function the first platform for predictive modeling and machine studying workflows.

But Excel’s accessibility masks a crucial hole: the distinction between operating fashions and constructing reliable analytics techniques. Engaged on a mortgage approval prediction venture, I found that Excel-based machine studying fails not resulting from algorithmic limitations, however resulting from some practices which can be continuously missed.

This text transforms the unwelcome experiences into 5 complete frameworks that may elevate your Excel-based machine studying work. 

 

Lesson 1: A number of Strategies for Outlier Detection

 
Outlier dealing with is extra artwork than science, and untimely elimination can get rid of authentic excessive values that carry necessary info. In a single case, all residential asset values above the ninety fifth percentile had been eliminated utilizing a easy IQR calculation, below the belief they had been errors. Later evaluation revealed the elimination of authentic ultra-high-value properties, a related section for big mortgage approvals.

The lesson: Use a number of detection strategies and guide evaluation earlier than elimination. Create a complete outlier detection framework.

In a brand new sheet adjoining to the principle knowledge, create detection columns:

  • Column A: Unique Worth (residential_assets_value)
  • Column B: IQR Methodology
    =IF(A2 > QUARTILE.INC($A$2:$A$4270,3) + 1.5*(QUARTILE.INC($A$2:$A$4270,3)-QUARTILE.INC($A$2:$A$4270,1)), "Outlier_IQR", "Regular")
  • Column C: 3-Sigma Methodology
    =IF(ABS(A2-AVERAGE($A$2:$A$4270)) > 3*STDEV($A$2:$A$4270), "Outlier_3SD", "Regular")
  • Column D: Percentile Methodology
    =IF(A2 > PERCENTILE.INC($A$2:$A$4270,0.99), "Outlier_P99", "Regular")
  • Column E: Mixed Flag
    =IF(COUNTIF(B2:D2,"Outlier*")>=2, "INVESTIGATE", "OK")
  • Column F: Handbook Evaluation [Notes after investigating]
  • Column G: Last Determination [Keep/Remove/Transform]

This multi-method method revealed patterns in my mortgage knowledge:

  • Values flagged by all three strategies (IQR, 3-sigma, and percentile): Probably errors
  • Values flagged by IQR however not 3-sigma: Legit excessive values in skewed distributions
  • Values flagged solely by percentile: The intense however legitimate instances I virtually misplaced

The “Handbook Evaluation” column is essential. For every flagged statement, doc findings akin to: “Legit luxurious property, verified in opposition to public data” or “Probably knowledge entry error, worth exceeds market most by 10x.”

 

Lesson 2: At all times Set Random Seeds

 
Few experiences are extra irritating than presenting glorious mannequin outcomes, then being unable to breed these precise numbers when getting ready the ultimate report. This state of affairs occurred with a classification tree mannequin: Sooner or later’s validation accuracy was 97.3%, however subsequent day’s was 96.8%. The distinction appears small, however it undermines credibility. Makes the viewers marvel which quantity is actual and the way a lot can this evaluation be trusted.

The lesson: The offender is random partitioning with out a fastened seed. Most machine studying algorithms contain randomness at some stage.

  • Knowledge partitioning: Which observations go into coaching vs. validation vs. check units
  • Neural networks: Preliminary weight randomization
  • Some ensemble strategies: Random characteristic choice

XLMiner makes use of random processes for partitioning the information. Working the identical mannequin twice with similar parameters yields barely completely different outcomes as a result of the coaching/validation cut up differs every time.

The answer is straightforward however non-obvious. When utilizing XLMiner’s partition performance (present in most mannequin dialogs):

  1. Verify the field labeled “Set seed” (it is unchecked by default)
  2. Enter a selected integer: 12345, 42, 2024, or any memorable quantity
  3. Doc this seed worth within the Mannequin Log

Now, each time the mannequin is run with this seed:

  • An identical coaching/validation/check splits
  • An identical mannequin efficiency metrics
  • An identical predictions for a similar observations
  • Excellent reproducibility

Right here is an instance from the mortgage approval dataset with out seed (three runs of similar logistic regression):

  • Run 1: Validation Accuracy = 92.4%, F1 = 0.917
  • Run 2: Validation Accuracy = 91.8%, F1 = 0.923
  • Run 3: Validation Accuracy = 92.1%, F1 = 0.919

And with with seed=12345 (three runs of similar logistic regression):

  • Run 1: Validation Accuracy = 92.1%, F1 = 0.928
  • Run 2: Validation Accuracy = 92.1%, F1 = 0.928
  • Run 3: Validation Accuracy = 92.1%, F1 = 0.928

The distinction issues enormously for credibility. When tasked with recreating the evaluation, it may be achieved with confidence, understanding the numbers will match.

Vital caveat: The seed controls randomness in partitioning and initialization, however it would not make the evaluation resistant to different adjustments. If knowledge is modified (including observations, altering transformations) or mannequin parameters are adjusted, outcomes will nonetheless differ, as they need to.

 

Lesson 3: Correct Knowledge Partitioning: The Three-Method Break up

 
Associated to reproducibility is partition technique. XLMiner’s default settings create a 60/40 coaching/validation cut up. This appears affordable till the query arises: the place’s the check set?

A standard mistake includes constructing a neural community, tuning it primarily based on validation efficiency, then reporting these validation metrics as remaining outcomes.

The lesson: And not using a separate check set, the optimization happens instantly on the information being reported, inflating efficiency estimates. The right partitioning technique makes use of three units.

1. Coaching Set (50% of Knowledge)

  • The place the mannequin learns patterns
  • Used to suit parameters, coefficients, or weights
  • For the mortgage dataset: ~2,135 observations

2. Validation Set (30% of Knowledge)

  • For mannequin choice and hyperparameter tuning
  • Used to match completely different fashions or configurations
  • Helps choose one of the best pruned tree, optimum cutoff worth, or supreme neural community structure
  • For the mortgage dataset: ~1,280 observations

3. Take a look at Set (20% of Knowledge)

  • “Last examination” – solely rating as soon as
  • Used ONLY in any case modeling selections are full
  • Gives unbiased estimate of real-world efficiency
  • For the mortgage dataset: ~854 observations

Essential rule: By no means iterate on check set efficiency. The second a mannequin is chosen as a result of “it performs higher on the check set,” that check set turns into a second validation set, and efficiency estimates grow to be biased.

That is my workflow now:

  1. Set seed to 12345
  2. Partition 50/30/20 (coaching/validation/check)
  3. Construct a number of mannequin variants, evaluating every on validation set solely
  4. Choose one of the best mannequin primarily based on validation efficiency and enterprise necessities
  5. Rating the check set precisely as soon as with the chosen mannequin
  6. Report check set efficiency because the anticipated real-world end result

Right here is an instance from the mortgage approval venture:

Mannequin Model Coaching Acc Validation Acc Take a look at Acc Chosen?
Logistic Regression (all vars) 90.6% 89.2% Not scored No
Logistic Regression (stepwise) 91.2% 92.1% Not scored No
Classification Tree (depth=7) 98.5% 97.3% Not scored Sure
Classification Tree (depth=5) 96.8% 96.9% Not scored No
Neural Community (7 nodes) 92.3% 90.1% Not scored No

 

After choosing the Classification Tree (depth=7) primarily based on validation efficiency, the check set was scored precisely as soon as: 97.4% accuracy. This check accuracy represents the anticipated manufacturing efficiency.

 

Lesson 4: The Coaching/Validation Hole: Recognizing Overfitting Earlier than It Hurts

 
The issue: Preliminary have a look at the classification tree outcomes from the venture report appear promising.

Coaching Knowledge Efficiency:

  • Accuracy: 98.45%
  • Precision: 99%
  • Recall: 96%
  • F1 Rating: 98.7%

The mannequin appeared profitable so far till the main focus received shifted to the validation outcomes.

Validation Knowledge Efficiency:

  • Accuracy: 97.27%
  • Precision: 98%
  • Recall: 94%
  • F1 Rating: 97.3%

The distinction appeared small, simply 1.18% accuracy distinction. However figuring out whether or not the hole constituted an issue required a scientific framework.

The lesson: It is vital to know when the mannequin memorizes as a substitute of learns.

The sensible resolution: Create an overfitting monitor. Construct a easy however systematic comparability sheet that makes overfitting apparent.

Step 1: Create the Comparability Framework

Here’s a mannequin efficiency comparability within the “Overfitting_Monitor” sheet:

Metric Coaching Validation Hole Hole % Standing
Accuracy 98.45% 97.27% 1.18% 1.20% ✓ Good
Precision 99.00% 98.00% 1.00% 1.01% ✓ Good
Recall 96.27% 94.40% 1.87% 1.94% ✓ Good
F1 Rating 98.76% 97.27% 1.49% 1.51% ✓ Good
Specificity 96.56% 92.74% 3.82% 4.06% ? Watch

 

And listed here are the interpretation guidelines:

  • Hole < 3%: ✅ Good – Mannequin generalizing nicely
  • Hole 3-5%: ❓ Watch – Acceptable however monitor carefully
  • Hole 5-10%: ⚠️ Regarding – Doable overfit, think about simplification
  • Hole > 10%: ❌ Drawback – Particular overfit, should tackle

And that is the detailed evaluation:

  • General Evaluation: GOOD
  • Reasoning: All main metrics inside 2% hole. Specificity hole barely increased however nonetheless acceptable. Mannequin seems to generalize nicely.
  • Suggestion: Proceed with check set analysis.

Step 2: Add the calculation formulation

Cell: Hole (for Accuracy)
=[@Training] - [@Validation]

Cell: Hole % (for Accuracy)
=([@Training] - [@Validation]) / [@Training]

Cell: Standing (for Accuracy)

=IF([@[Gap %]]<0.03, "✓ Good",
    IF([@[Gap %]]<0.05, "? Watch",
       IF([@[Gap %]]<0.10, "⚠ Regarding", "✗ Drawback")))

 

Step 3: Create a Visible Overfitting Chart

Construct a side-by-side bar chart evaluating coaching vs. validation for every metric. This makes patterns immediately seen:

 
Create a Visual Overfitting ChartCreate a Visual Overfitting Chart
 

When bars are shut, the mannequin generalizes nicely. When coaching bars are for much longer than validation bars, there may be overfitting.

Evaluating Throughout Totally different Fashions

The actual worth comes from evaluating overfitting patterns throughout the mannequin choices. Right here is the comparability for the “Model_Overfitting_Comparison” sheet:

Mannequin Practice Acc Val Acc Hole Overfitting Threat
Logistic Regression 91.2% 92.1% -0.9% Low (adverse hole)
Classification Tree 98.5% 97.3% 1.2% Low
Neural Community (5 nodes) 90.7% 89.8% 0.9% Low
Neural Community (10 nodes) 95.1% 88.2% 6.9% Excessive – Reject this
Neural Community (14 nodes) 99.3% 85.4% 13.9% Very Excessive – Reject this

 

Interpretation: The neural community with 10+ nodes is clearly overfitting. Regardless of excessive coaching accuracy (99.3%), validation accuracy drops to 85.4%. The mannequin memorized coaching knowledge patterns that do not generalize.

Best option: Classification tree

  • Excessive efficiency (97.3% validation)
  • Minimal overfitting (1.2% hole)
  • Good steadiness of complexity and generalization

Listed below are some easy methods to scale back overfitting when noticed:

  • For Classification Bushes: Scale back most depth or enhance minimal samples per node
  • For Neural Networks: Scale back variety of nodes or layers
  • For Logistic Regression: Take away variables or use stepwise choice
  • For All Fashions: Add extra coaching knowledge if attainable

 

Lesson 5: Implement Knowledge Validation for Categorical Variables

 
Knowledge entry errors are silent killers of machine studying tasks. A single typo, akin to “gradute” as a substitute of “graduate”, creates a 3rd class in what must be a binary variable. The mannequin now has an sudden characteristic worth it is by no means seen throughout coaching, probably inflicting errors throughout deployment or, worse, silently producing incorrect predictions.

The prevention: Excel’s knowledge validation characteristic. This is the implementation protocol for categorical variables:

In a hidden sheet (title it “Validation_Lists”), create lists of legitimate values:

  • For training: Create a column with entries “Graduate” and “Not Graduate”
  • For self-employment: Create a column with entries “Sure” and “No”
  • For mortgage standing: Create a column with entries “Authorised” and “Rejected”

Within the knowledge entry sheet:

  • Choose all the column for a categorical variable (e.g., column containing training knowledge)
  • Knowledge → Knowledge Validation → Settings tab
  • Enable: Listing
  • Supply: Navigate to the hidden validation sheet and choose the suitable record
  • Error Alert tab: Type = Cease, with a transparent message: “Solely ‘Graduate’ or ‘Not Graduate’ are legitimate entries”

Now it is not possible to enter invalid values. Customers see a dropdown with legitimate decisions, eliminating typographical errors totally.

For numeric variables with recognized ranges, apply comparable validation to forestall not possible values:

  • Credit score scores: Should be between 300 and 900
  • Mortgage time period: Should be between 1 and 30 years
  • Annual revenue: Should be better than 0

Choose the column, apply knowledge validation, set:

  • Enable: Complete Quantity (or Decimal)
  • Knowledge: between
  • Minimal: 300 (for credit score scores)
  • Most: 900

 

Last Ideas

 
Here’s a abstract of the teachings outlined within the article.

 

5 Excel AI Classes I Discovered the Exhausting Method5 Excel AI Classes I Discovered the Exhausting Method
5 Excel AI Classes I Discovered the Exhausting Method (click on to enlarge)

 

The 5 practices on this article — multi-method outlier detection, setting random seeds, three-way knowledge partitioning, monitoring the training-validation hole, and implementing knowledge validation — share a standard thread: they’re all easy to implement however devastating to omit.

None of those practices require superior statistical data or advanced programming. They do not demand extra software program or costly instruments. Excel XLMiner is a robust instrument for accessible machine studying.
 
 

Rachel Kuznetsov has a Grasp’s in Enterprise Analytics and thrives on tackling advanced knowledge puzzles and trying to find recent challenges to tackle. She’s dedicated to creating intricate knowledge science ideas simpler to know and is exploring the assorted methods AI makes an influence on our lives. On her steady quest to study and develop, she paperwork her journey so others can study alongside her. Yow will discover her on LinkedIn.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

PHP Code Snippets Powered By : XYZScripts.com