THAT’S IT FOR TODAY!
Supervised Learning
Classification
Regression vs Classification
Business applications
Models: Logistic Regression, Naive Bayes, k-NNs
Terminology: from variable to early stopping
Mathemical explanation for each of core models
Model choice based on on business questions and data
Initiation - evaluation - fitting - reprocessing - fine-tuning
Python code for each stage of the process
Julia Lenc
Analytics Journey
Business Analytics (BA)
1. Intro: Business and Revenue models. KPIs
2. Business models translated into analytics
3. Techniques: Descriptive, Diagnostic, Predictive, Prescriptive
Diagnostic Techniques
1. Inference: hypotheses testing
2. Unsupervised Learning: clustering, dimensionality reduction, anomalies
Predictive Techniques
1. Supervised learning: overview
2. Preparation: data pre-processing
3. Foundations: model choice and evaluation
4. Regression: linear and non-linear
5. Classification: logistic regression, Naive Bayes, k-NNs (this presentation!)
6. Time series: ARIMA, SARIMA, Exponential Smoothing
7. Advanced: Decision Trees, SVM
8. Ensemble: bagging, boosting, stacking
9. Neural Networks: FFNN, CNN, RNN, Transformers
Prescriptive Techniques
1. Optimization: Linear, Non-linear and Dynamic programming
2. Simulation: Monte Carlo, Discreet Events, System Dynamics
3. Probabilistic Sequence: Markov Chains, Markov Decision Processes
4. Reinforcement Learning: Q-Learning, Deep RL, Policy Gradient
Julia Lenc
THAT’S IT FOR TODAY!
The process: Stage 1
1. Understand and formulate the business question as:
Specific: Define the problem clearly (e.g., classification vs. regression tasks).
Measurable: Determine evaluation criteria (e.g., accuracy, precision / recall).
Achievable: Ensure data and resources match the modeling goals.
Relevant: Validate that answering this question will drive action.
Time-bound: Identify stakeholders and key deadlines for delivery.
A cost function used to evaluate probabilistic models, penalizing incorrect predictions heavily.
2. Prepare the data to meet requirements:
Read here about 8 stages of data preparation to get perfect input
3. Choose the model and set evaluation criteria:
Read here about confusion matrix, evaluation criteria and “precision vs recall”
Julia Lenc
THAT’S IT FOR TODAY!
Import the data
Pre-requisites: data preprocessing is here, validation criteria are here
A cost function used to evaluate probabilistic models, penalizing incorrect predictions heavily.
THAT’S IT FOR TODAY!
Model Run. Evaluation
A cost function used to evaluate probabilistic models, penalizing incorrect predictions heavily.
Evaluation
Rest of the code is on the next slide :)
THAT’S IT FOR TODAY!
Model Run. Evaluation
A cost function used to evaluate probabilistic models, penalizing incorrect predictions heavily.
This is the rest of the code from previous page
Evaluation
It would not work on its own :)
THAT’S IT FOR TODAY!
Model Run. Evaluation
A cost function used to evaluate probabilistic models, penalizing incorrect predictions heavily.
This is the rest of the code from previous page
Evaluation
It would not work on its own :)
Here we evaluate accuracy. Add other aligned metrics!
THAT’S IT FOR TODAY!
Overfitting / Underfitting
A cost function used to evaluate probabilistic models, penalizing incorrect predictions heavily.
Evaluation
THAT’S IT FOR TODAY!
Reassess pre-processing
A cost function used to evaluate probabilistic models, penalizing incorrect predictions heavily.
Evaluation
THAT’S IT FOR TODAY!
Fine-tuning
(last chance before complexity increase)
A cost function used to evaluate probabilistic models, penalizing incorrect predictions heavily.
Evaluation