Analytics Journey (links)
Business Analytics. Data Science. Machine Learning
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
6. Time series: ARIMA, SARIMA, Exponential Smoothing
7. Advanced models: a. Decision Trees, b. SVM, c. (G)ARCH
8. Ensemble: bagging, boosting, stacking
9. Neural Networks: FFNN, CNN, RNN, Transformers
Prescriptive Techniques
1. Prescriptive techniques and reinforcement learning: overview
2. Optimization: Linear, Non-linear and Dynamic programming (now!)
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
Types of business analytics
Descriptive
“What has happened?”
Exploratory Data Analsis, descriptive statistics, visualizations
Diagnostic
“Why did it happen?”
Inference (hypothesis testing). Unsupervised learning
Predictive
“What is likely to happen?”
Supervised learning (forecasting)
Prescriptive
“What should we do?”
Optimization. Simulation. Sequence. Reinforcement learning
Read here about business analytics (details) Julia Lenc
THAT’S IT FOR TODAY!
Stage 4: setting up Solvers
Excel Solver: Linear and Non-Linear Programming
1.Inputs (decision variables, data for constraints):
- numeric or 0/1 encoded categorical
- tabular (matrix) representation
2. Objective:
- cell with linear (LP, NLP) or non-linear formula (NLP)
- linked to variable cells
3. Constraints:
- inputted into Solver as linear (LP, NLP) or non-linear formulas (NLP)
4. Algorithm:
- Simplex LP
- GRG Nonlinear
Excel Solver (YouTube tutorial)
Excel Solver (step-by-step with visuals)
Julia Lenc
THAT’S IT FOR TODAY!
Stage 4: setting up Solvers
Excel VBA: Dynamic Programming
1.States. Define possible states (rows for all unique situations/stages).
2.Decisions. List decision options per state (columns or arrays; e.g., action to
take at each step).
3.Transitions. Table or function mapping current state & decision to next state.
4.Value Function. Recursive relationship/formula to compute the optimal (e.g.,
cost, reward) for each state.
5. Parameters. Any fixed numeric input (arrays, tables, VBA constants).
6. Boundary/Initial conditions. Start and final values.
7. Initiation:
-Set up your states, transitions, and values in worksheets or arrays.
- Not native to Solver! Write a VBA macro or function to loop recursively /
iteratively through all states and decisions.
- Save/trace back optimal solution path if required.
VBA macros (YouTube tutorial)
VBA macros (Microsoft documentation)
Julia Lenc
THAT’S IT FOR TODAY!
Stage 4: setting up Solvers
Python: Linear Programming PuLP
Typical Use: assignment, scheduling, resource allocation, blends
Library: PuLP, scipy.optimize, Pyomo
from pulp import LpProblem, LpVariable, lpSum, LpMinimize #Also LpMaximize
Functions:
LpProblem() - problem setup, LpVariable() - decision vars,
lpSum() - constraints with Python logic, .solve() - calls solver, e.g. Gurobi
Python: Non-Linear Programming scipy.optimize
Typical Use: portfolio optimization, nonlinear regressions, network flows
Library: scipy.optimize, Pyomo
from scipy.optimize import minimize #Cannot maximize, need to multiply by -1
Functions:
minimize(), maximize(), NonlinearConstraint()
Python: Dynamic Programming DP in Python
Typical Use: shortest path, inventory, knapsack, other stagewise/recursion problems
Defining function:
def dp(state): # Recursive or iterative
# fill table or memo, compute optimal value
Functions:
tabulation (arrays, loops) and recursive functions to memorize or lru_cache
THAT’S IT FOR TODAY!
Stage 4: Solvers overview
Linear Non-Linear
Solver
Programming Programming
Gurobi link
IBM CPLEX link
GLPK link
GBC link
Pyomo link
MOSEK link
1. All advanced solvers have Python API
2. None of advance solvers natively supports classic
dynamic programming → you must code algorithms
manually (in Python, VBA, etc.).
Julia Lenc
THAT’S IT FOR TODAY!
Did you find it useful?
Save
Share
Follow
Analytics, Market Research,
Machine Learning and AI
Julia Lenc