1/65
Looks like no tags are added yet.
5 steps for approaching a new project with Data Analytics/AI
Define the Questions
Collect and Acquire the data
clean the data
analyze the data
interpret and present the results
Define the questions
Identify why the analysis is needed, clearly define the problem/research question (or hypothesis), and determine what data are needed and where they can be obtained
Collect and aquire the data
obtain the data needed to answer the question from appropriate and reliable sources
Clean the data
identify and address anomalies, duplicates, missing values, and other data-quality problems before analysis and interpretation
Analyze the data
select methods that match the question and the data; examples inclue regression, classification, clustering, time-series/statistical analysis, and AI
Interpret and present the results
communicate key values, patterns, trends, and findings clearly with suitable tables/figures, and use the results to answer the original question and draw appropriate conclusions
A system approach of problem-solving (SAPS)-Data Analytics
Define user needs and requirements
problem formulation and task definition
model
data
performance measurement
error analysis
refine with feedback
complete solution
feasibility and benefits analysis
future direction
Define user needs and requirements
represents the end-user problem and decision, current practices/gaps, and the critical information or outputs the solution must deliver
Problem formulation and task definition
represents translating the user need into a precise DA/AI task (regression, classification, segmentation, optimization, RL) and defining the required model output
Model
Represents the model/architecture, loss or objective/reward/penalty, training/validation/tuning strategy, and the complexity-interpretability-performance trade-off
Data
Represents data sources/types and characteristics (quality, diversity, quantity), cleaning/noise handling, ground-truth labeling/annotation and QA/QC, and data splitting
Performance measurement
Represents selecting task-aligned performance metrics, evaluating/comparing models on separate data, and interpreting the result in the engineering context
error analysis
Represents going beyond summary metrics to inspect FN/FP or other errors, identify reasons, characterize/categorize factors, and prioritize the important causes
Refine with feedback
Represents using prioritized error-analysis findings to change the model/data/training, retrain, and re-evaluate the improved system
Complete Solution
Represents integrating the DA/AI component with the other components required for a deployable engineering solution, such as interfaces, infrastructure, operations, policy, or legal elements
Feasibility and benefits analysis
Represents economic and risk analysis, scalability, limitations/failure scenarios, and expected benefits, cheicking whether the complete solution actually meets the original user needs
Future Direction
Represents remaining gaps and next needs arising from error analysis, complete-solution implementation, feasibility/benefits, technology development, and evolution of the problem definition
Prediction
Care primarily about how accurately the model predicts new observations
Inferenced
Interested in the coefficients themselves:
holding rainfall and lane width constant, a one-unit increase in AADT is associated with a 0.003-unit increase in predicted IRI
Reducible error
Error caused by an imperfect model, we could reduce the error by using a better model
Irreducible error
Randomness/information that cannot realistically be eliminated
Why nearest neighbor averaging fails in high dimensions
in high-dimensional space, observations become surprisingly far apart: curse of dimensionality
trading some flexibility for the ability to learn from data in high-dimensional settings
Training MSE vs. test MSE
training MSE generally decreases as flexibility increases
test MSE: at first, increasing flexibility helps: model goes from too simple to approx. complex and test error decreases. but then model starts fitting noise and test error increases: so U-shaped
Bias and variance
low flexibility
high bias, low variance, underfitting
high flexibility
low bias, high variance, potential overfitting
bias-variance trade-off
Underfitting vs overfitting
Underfitting: model is too simple, high training error, high test error, high bias
Overfitting: model is too flexible, extremely low training error, high test error, high variance
learns signal + noise
Parsimony
Preferring a simpler explanation/model when it performs adequately
K-nearest neighbors classification
KNN can be used for classification
small K: very flexible, the prediction depends heavily on one observation
Low K →high flexibility → high variance
large K: more averaging
Large K → lower flexibility → higher bias
Supervised vs. unsupervised learning
supervised learning
Inputs + known outcome (regression, classification)
Unsupervised learning
don’t have and out come label, discover structure without labeled outcomes
AI terminology
Deep learning: multi-layer neural networks
Large language models: LLMs are models trained to work with language. Learn from statistical patterns in language and can generate text
Generative AI: creates new content, predicts a category for an existing observation
Association vs. causation
even if you adjust for several variables, observational regression does not automatically establish causality (statistical significance doesn’t equal causation)
TSS
measures total variation in Y before considering our model
R²
Tells us how much of the variation in Y is explained by the model
R² = 1 - (RSS) / (TSS)
explains __% of observed variation in the response, relative to using the mean alone
MSE:
mean squared error (RSS / n)
F-statistic
tests whether the model provides evidence that at least one predictor has a nonzero relationship with the response
Lower Threshold Effects
Usually higher sensitivity, lower specificity
Raising Threshold Effects
Usually lower sensitivity, higher specificity
ROC curve
Receiver Operating Characterisitic, shows trade-off between TPR=sensitivity and FPR as the classification threshold changes
AUC
Area under the ROC curve, about ranking/discrimination, not simply whether one particular threshold gives good accuracy
Supervised learning
learns from: labeled input-output pairs, objective to minimize prediction error, need labeled data
Unsupervised learning
learns from unlabeled data and model looks for structure, ex: Traffic-pattern clustering
Reinforcement learning
There is agent interacting w environment and agent takes an action and receives reward or penalty
Deep learning
uses multi-layer neural networks, and each lauer can learn increasingly complicated representations; powerful for complex patterns and high-dimensional inputs
Gnerative AI
creates new ocntent, generation doesn’t equal classification
Large language models
Language-focused generative AI, and use neural-network architectures, and transformers, to model language
Training error
measures how well the model fits data it has already seen
Test error
estimates how well it generalizes to unseen data
Increasing flexibility →
decreases training error but can eventually increase test error because of overfitting
High bias →
means the model is systematically too simple
High variance →
the model is sensitive to changes in the training data
Small vs large K
small K → KNN more flexible
large K → KNN less flexible
Regression vs classification
regression: predicts continuous outcomes
classification predicts categorical outcomes
Supervised vs unsupervised learning
Supervised learning: uses labeled outcomes
Unsupervised learning: finds structure without outcome labels
Statistical associated
does not by itself establish causation
Small p-value
indicates evidence against a zero coefficient, but it does not tell us that the effect is large or practically important
K-level categorical variable
represented by K-1 dummy variables, with the omitted category serving as the baseline
An interaction
means the effect of one predictor depends on another predictor
lower classification threshold
generally increases sensitivity and decreases specificity
Accuracy can be misleading
when one class is much more common than the other
Cross-validation (CV)
holds out different portions of the data to estimate out-of-sample performance
Leakage
prevented by any outcome-based predictor selection or preprocessing occuring inside each training fold
Bootstrap samples
drawn with replacement, have same size as og sample, repeatedly used to estimate sampling variability of a statistic
Reinforcement learning
learns through rewards and penalties, so reward design directly influences behavior
Deep learning
uses multi-layer neural networks
Generative AI
creates new content rather than merely predicting or classifying existing observations
LLMs
generate and analyze language, but fluent technical output must still be verified.