Comprehensive Big Data & Machine Learning Study Guide
Enterprise Artificial Intelligence Case Studies
- Digital Transformation in Banking: NH Nonghyup Bank
- Operational Background & Drivers:
- Traditional commercial banks are shifting focus from in-person teller counters to non-face-to-face, digital-first financial services to preserve market competitiveness.
- Bank workforces have decreased substantially due to ongoing retirements, creating an urgent operational requirement for process automation and branch efficiency.
- Digital financial competition spans traditional tier-one banks (우리은행, 하나은행, KB국민은행, 신한은행, NH농협은행), internet-only banks (kakaobank, K bank, toss bank), payment ecosystems (NAVER FINANCIAL, Kakao Pay, coupang pay), and specialized tech-fin platforms (toss, Fint, banksalad).

- Dual Strategic Objectives:
- Deploy artificial intelligence tellers to fill human workforce vacancies across retail branches.
- Establish an Explainable AI () financial product recommendation system to deliver personalized customer interactions and foster user trust.
- Data Asset Integration:
- Customer Profiles: Age, occupation, total asset scale, demographic indicators.
- Historical Transaction Logs: Account deposits, withdrawals, credit card expenditure, loan repayment patterns.
- Behavioral Patterns: Mobile app login frequency, branch visit regularity, consultation histories, in-app search queries.
- External Financial Indicators: Central bank interest rate trajectories, macroeconomic indicators, foreign exchange () volatility.
- Operational Knowledge Base: Historical customer consultation records, product investment disclosures, standard transaction execution protocols, product terms, regulatory prospectuses.
- AI Teller Implementation Architecture:
- Built atop NH Nonghyup Bank's proprietary AI Technology Hub Platform, combining Natural Language Processing () with high-fidelity video/facial synthesis.
- Visual personas modeled after the facial feature data of approximately 60 actual employees:
- Jung Yi-deun (정이든): 20s Assistant Manager (계장).
- Lee Ro-woon (이로운): 30s Senior Manager (과장).

- Real-time multimodal synchronization aligns synthetic audio, facial micro-expressions, and lip kinematics.
- Conversational pipeline: Customer speech query Speech-to-Text () conversion Intent classification via Core banking database information retrieval Contextual response generation Text-to-Speech () audio output.
- Supported services: Non-face-to-face credit card issuance consultations, financial product explanatory walk-throughs, general account inquiries.
Explainable AI () Recommendation System:
- Implements deep learning recommendation algorithms evaluating customer profiles and transaction records in real time.
- In tandem with product recommendations, generates explicit contextual rationales (e.g., "Foreign exchange volatility has risen significantly in recent days; therefore, we recommend an FX foreign currency deposit product").
- Utilizes a Machine Learning Operations () lifecycle infrastructure to automate model training, continuous integration, validation, and real-time deployment.
- Automatically re-trains and updates model weights upon macroeconomic shifts (such as base rate hikes) to maintain product recommendation timeliness.
Operational Metrics & Future Roadmap:
Deployed across all 1,103 retail branches nationwide as of February 2024 (the first full branch deployment among South Korean commercial banks).
Measured outcomes: Statistically significant increases in product subscription conversion rates, marked reductions in formal civil complaints, measurable improvements in consultation quality standards.
Evolution: Expansion into mobile application interfaces, automated digital consultation kiosks (digital desks), and pilot testing of interactive explanatory systems powered by generative AI.
Smart City Traffic Optimization: Alibaba City Brain
Urban Congestion Challenges:
- Hangzhou (China): Rapid urban growth and surging vehicle volumes resulted in extreme gridlock, recurrent bottlenecking at critical intersections, and delayed emergency response vehicles.
- Kuala Lumpur (Malaysia): Chronic traffic stagnation driven by rapid metropolitan development outpacing existing roadway physical infrastructure and fixed-interval signal logic.
Multi-Source Data Ingestion:
- Real-time video feeds from municipal CCTV networks and traffic surveillance cameras across the urban perimeter.
- Traffic light sequence status and localized inductive-loop/radar sensor signals.
- High-frequency GPS telemetry from private passenger vehicles, municipal buses, and commercial transport.
- AutoNavi navigation routing telemetry and municipal emergency service dispatch logs.
- Geotagged social network service () posts combined with meteorological data to anticipate demand spikes during adverse weather or large-scale civil events.

- Analytical & Optimization Pipeline:
- Computer vision models driven by deep learning object detection classify vehicles, identify lane occupancy, and flag dynamic road anomalies (e.g., collisions, vehicle breakdowns, illegal parking).
- Deep neural networks () trained on 3 months of historical traffic movement compute dynamic traffic signal timing.
- Real-time cloud computing dynamically modulates green-light cycle durations to maximize vehicle throughput.
- System automatically coordinates proactive dispatch routing: adjusts municipal bus dispatch intervals and pushes dynamic detours to navigation apps.
- Quantitative Performance & Future Roadmap:
- Hangzhou: Intersection transit duration reduced by , emergency response travel times reduced by , automated collision detection realized within .
- Kuala Lumpur: Cloud-driven real-time traffic signal optimization successfully distributed peak-hour traffic volumes across peripheral arterials.
- City Brain 2.0 Evolution: Incorporation of automated municipal fire emergency response routing, expanding into smart manufacturing line logistics and precision agricultural management.
The Five-Stage Data Analysis Lifecycle

- Stage 1: Analysis Planning (분석 기획)
- Serves as the structural blueprint; inadequate planning results in misdirected analytical workflows or non-actionable outputs.
- Formal definition of analytical scope, business requirements, research papers, and technical precedents.
- Assessment of data availability and technical feasibility before committing computational or human resources.
- Articulation of business translation mechanisms (how analytical models will impact decision-making or production environments).
- Standardization using an Analysis Planning Form:

- *Analysis Title (분석 제목)*: Specific naming convention denoting scope.
- *Background & Necessity (분석 배경 및 필요성)*: Qualitative and quantitative justification.
- *Core Objectives (분석 목적)*: Targeted business or research outcome.
- *Methodology (분석 방법)*: Analytical paradigm (regression, classification, clustering, deep learning).
- *Required Data (필요 데이터)*: Explicit attributes, formats, volumes, collection dates.
- *Operational Considerations (분석 시 고려 사항)*: Privacy, compute constraints, regulatory boundaries.
- *Result Utilization Plan (결과 활용 방안)*: Reporting mechanism or software integration pipeline.
Stage 2: Data Collection (데이터 수집)
- Centralizing disparate raw data sources into a unified repository for modeling.
- Collection avenues: Automated API pipelines from national open data portals (e.g., KOSIS, Public Data Portal), direct database queries, client acquisition, manual structured recording.
- Tracking data provenance, temporal reference anchors, and schema versioning to verify freshness and validate integrity.
- Initial inspection of summary statistics, missing values, and corrupted entries to prevent downstream re-collection overhead.
Stage 3: Data Preprocessing (데이터 전처리)
- Structural Manipulation & Restructuring:
- Transposing row-column dimensions, pivoting variables, concatenating disjoint time-series datasets, and cross-table relational joins.
- Missing Data (결측치) & Outlier (이상치) Treatment:
- Missing Values: Unrecorded, null, or corrupt observations (
?,NaN,.). Handled via row-wise/column-wise deletion or statistical imputation (mean, median, mode, model-based). - Outliers: Measurements deviating significantly from standard statistical bounds due to recording error or rare anomalies. Must be identified and mitigated (e.g., IQR filtering, clipping) to avoid skewing downstream parameter estimation.
- Encoding & Feature Scaling:
- Categorical Encoding: Converting text-based categories into machine-readable numeric formats (e.g., mapping binary gender values
'Male'and'Female'to and ). - Feature Scaling: Equalizing the variance and magnitude scales of numeric features. Because distance-based and gradient-based algorithms treat raw inputs without innate awareness of physical units (e.g., height in centimeters spanning vs. weight in kilograms spanning ), unscaled inputs cause models to disproportionately weight larger numerical scales. Techniques include Min-Max Normalization ( range scaling) and Standardization (mean of , standard deviation of ).
Stage 4: Data Modeling & Analysis (데이터 분석)
- Ingestion of cleaned, preprocessed feature matrices into mathematical modeling algorithms.
- Three Primary Analytical Categories:
- Exploratory Data Analysis (): Statistical profiling and distribution visualization to uncover structural properties, multi-collinearity, and latent trends.
- Machine Learning Modeling: Supervised algorithms (predicting numerical quantities or categorical classes) and unsupervised algorithms (uncovering natural clusterings).
- Deep Learning Modeling: Multi-layered neural network architectures applied to complex, high-dimensional unstructured formats (computer vision, speech recognition, NLP).
- Optimization via Feature Engineering & Hyperparameter Tuning:
- Deriving novel variables from existing feature combinations to boost signal.
- Adjusting model hyperparameters (e.g., tree depth, distance metrics, cluster count , regularization penalties) to maximize generalization and prevent overfitting.
Stage 5: Result Interpretation, Visualization & Utilization (결과 해석 및 활용)
- Raw algorithmic outputs possess no standalone business value without contextual interpretation grounded in domain expertise.
- Translating model performance scores (, accuracy, recall) into actionable operational insights.
- Generating intuitive static and dynamic graphical representations to communicate findings across technical and non-technical stakeholders:

- Integration modalities: Distributing formal analytic reports vs. establishing production endpoints for real-time automated system queries. Full project completion is reached when business decisions align with Stage 1 targets.
Foundational Principles of Machine Learning
- Taxonomy: Artificial Intelligence, Machine Learning, and Deep Learning
- Structural relationship: Strict hierarchical subset inclusion ().

Artificial Intelligence (): The computational simulation of human cognitive faculties, including perception, information synthesis, reasoning, and context-aware task execution (e.g., processing a weather query via web search synthesis).
Machine Learning (): A specialized branch of AI focused on constructing algorithms that optimize performance parameters from observational data, enabling automated pattern discovery and future state prediction without manual rule codification.
Deep Learning (): A sub-discipline of machine learning utilizing Multi-Layer Perceptrons () and deep artificial neural network topologies mimicking biological cerebral information processing. Excels in hierarchical feature extraction from raw unstructured data but requires substantial compute hardware (GPUs) and large-scale datasets.
- Data Structures: Structured vs. Unstructured Data
Structured Data (정형 데이터):
- Conforms to a standardized tabular schema comprising rows (instances, observations, data points) and columns (features, attributes, variables).
- Fully amenable to direct matrix mathematics, arithmetic manipulation, and relational database management systems ().

- Format examples: CSV files, spreadsheet workbooks, SQL tables.
Unstructured Data (비정형 데이터):
Lacks predefined structural formatting, schema consistency, or inherent tabular geometry.
Cannot be parsed directly by standard statistical regressors without conversion; requires human feature extraction or automated representation learning via deep neural network layers.
Format examples: Digital raster images, raw audio waveforms, natural language text passages, video sequences, social media logs.
Machine Learning Paradigms: Supervised vs. Unsupervised Learning
Supervised Learning (지도 학습):
- Algorithms train on datasets comprising paired input feature vectors and explicit ground-truth labels .
- The mathematical objective is learning an optimal parameter mapping function such that:
- Any learned model represents a statistical optimization of the training distribution; if training data is biased, incomplete, or corrupted, model outputs reproduce those errors.
- Supervised Learning Sub-Types:
- Regression (수치값 예측 / 회귀): The target variable is continuous and quantitative (e.g., financial prices, atmospheric temperatures, body weights). Models optimize parameters to identify the best-fitting curve or hyperplane.

- Classification (범주 분류 / 레이블 예측): The target variable is discrete and qualitative (e.g., fruit species, spam flags, credit risk tiers). Models construct decision boundaries separating vector spaces.

Unsupervised Learning (비지도 학습):
The training matrix contains solely feature vectors with no target variable or supervisory ground truth ( is absent).
The objective is uncovering intrinsic data geometry, latent topological structures, and cluster groupings (e.g., segmenting customer demographics by spend and frequency).
Dataset Partitioning & Validation Methodologies
Train-Test Splitting:
- Standard empirical validation isolates a training subset to optimize model parameters while reserving a disjoint test subset to evaluate generalization error.
- Standard partitioning ratio: training set to test set (alternatively or ).
- Stratification: Enforces identical class proportion distributions across both train and test splits, preventing sampling distortion in imbalanced datasets.
Cross-Validation (-Fold Cross-Validation):
- Mitigates sampling variance associated with single train-test splits.
- Partitions the complete training dataset into equal-sized partitions (folds).
- Executes distinct training iterations; in each iteration, folds train the model while the remaining fold validates performance.
- The final generalization estimate is the unweighted arithmetic mean of all test performance iterations.
Train-Validation-Test Splitting:
- Employed when fine-tuning structural model configurations (hyperparameters, such as neural network layer depth, activation selection, or tree pruning thresholds).
- Train set: Fits baseline model parameters (weights, coefficients).
- Validation set: Assesses hyperparameter performance configurations to identify the optimal variant.
- Test set: Evaluates the single best-performing model on completely unseen data to obtain an unbiased estimate of generalization.
The Orange3 Visual Programming Analytics Environment
- System Architecture & Platform Characteristics
- Developed by the Bioinformatics Laboratory at the University of Ljubljana, Slovenia; distributed as an open-source visual data mining suite.
- Utilizes a visual node-programming canvas where algorithmic steps are encapsulated within specialized graphic widgets.
- Saves full analytical canvas pipelines as files with the
.ows(Orange Workflow) extension. - Eliminates syntax debugging barriers, lowering entry friction relative to raw script environments while preserving data manipulation pipelines.

Installation Architecture & Execution Requirements
- Standard distribution installer: Orange version
3.37.0/3.40.0. - Engine dependency: Powered by a background Python distribution; installs a dedicated lightweight conda environment:
Miniconda3 py311_24.1.2-0 (64-bit). - Installation sequence:
- Run
Orange-3.37.0 Setup.exereview license agreement click[I Agree]. - Select user privileges:
[Install for anyone using this computer](All Users) or[Install just for me](Just Me). - Choose components: Check
Miniconda py311_24.1.2-0andInstall required packages(mandatory dependencies) optionally select desktop shortcuts click[Next]. - Select installation directory (strict recommendation: directory path must contain exclusively English ASCII characters without special characters or spaces).
- The installation process triggers the secondary
Miniconda3 Setupchild installer click[Next]agree to license set destination folder execute install click[Finish]. - Primary Orange installer resumes background library package configuration concludes setup click
[Finish].
- Standard distribution installer: Orange version
Workspace Anatomy & Navigation
- Top Menu Bar: File management (
File), canvas edit actions (Edit), screen zoom scaling (View), widget inspection (Widget), window arrangements (Window), system configurations and add-on extensions (Options), tutorials and documentation (Help). - Widget Toolbox Panel (Left): Search filter and categorized directories containing algorithmic nodes.
- Canvas (Center-Right): Graphical space where analytical workflows are constructed.
- Widget Link Mechanics: Connecting an upstream output port to a downstream input port. Dotted gray lines represent available connection ports; solid lines denote active data/model pipelines. Double-clicking links opens the link editor to route specialized signals (e.g., mapping
Data Samplevs.Remaining Datato downstream evaluation nodes).
- Top Menu Bar: File management (
Core Widget Category Registry
- Data Category:
File: Ingests external datasets from local drives or public URLs.Datasets: Ingests curated online analytical benchmark repositories (e.g., Iris, Heart Disease, Titanic, Brown Selected, HDI).Data Table: Renders data inputs in a tabular spreadsheet view showing instances, variables, and class labels.Column Statistics/Feature Statistics: Summarizes variable-level distributions, means, medians, variances, extrema, and missing counts.Save Data: Exports processed canvas datasets into external formats (.csv,.tab,.xlsx).CSV File Import: Special import node to specify delimiters, encodings, and headers whenFileencounters ingestion errors.- Transform Category:
Select Columns: Configures the attribute matrix by mapping columns into four functional roles:- Features (독립변수 ): Predictive attributes ingested by modeling algorithms.
- Target (종속변수 ): The objective outcome variable to predict.
- Metas (메타 변수): Supplementary non-modeling descriptive attributes (e.g., IDs, names, addresses).
- Ignored: Columns stripped from downstream analytics.
Select Rows: Filters instances via relational conditions across categorical (is,is not,is one of,is defined) or numeric attributes (equals,is below,is at most,is greater than,is at least,between,outside,is defined).Preprocess: Executes data cleaning routines, including missing value imputation (e.g., average imputation, random value replacement, or full row deletion) and normalization (scaling features to a unit interval or standardizing to mean and variance ).Data Sampler: Subsets datasets for validation pipelines (e.g., drawing a random or stratified training sample while routing the remaining for testing).Pivot Table: Restructures matrices by aggregating numerical values across intersections of categorical row and column groupings.

Concatenate: Stacks disparate datasets vertically along matching attribute columns, appending a source identifier column to denote dataset origin.

Merge Data: Joins two tabular datasets horizontally using a shared key column. Supports three operations:- Append columns from Extra data: Left Outer Join matching records from the secondary dataset to the primary table.
- Find matching pairs of rows: Inner Join retaining exclusively rows with keys present in both tables.
- Concatenate tables: Full Outer Join merging all rows across both datasets.
Formula: Derives new mathematical columns via functional expressions.Python Script: Custom Python scripting node executing code directly within the pipeline.- Visualize Category:
Scatter Plot: Two-dimensional Cartesian coordinate plotting mapping attributes to -axis, -axis, point color, size, and shape.Box Plot: Visualizes univariate continuous distributions showing first quartile (), median (), third quartile (), interquartile range (), and outlier thresholds.Distributions: Generates frequency histograms for discrete or binned continuous variables.Line Plot: Renders sequential continuous data values over ordering indices or time.Tree Viewer: Renders interactive hierarchical decision trees.Silhouette Plot: Renders graphical representations of intra-cluster cohesion and inter-cluster separation.- Model Category:
Tree: Algorithmic decision tree classifier and regressor supporting binary splits and node pruning.kNN: -Nearest Neighbors instance-based learning classifier and regressor.Linear Regression: Ordinary least squares linear modeling with optional L1 (Lasso) and L2 (Ridge) regularization.Logistic Regression: Log-odds classification modeling with regularization penalties.Neural Network: Multilayer Perceptron () artificial neural network architecture.Naive Bayes: Probabilistic classifier based on Bayes' theorem assuming conditional feature independence.- Evaluate Category:
Test and Score: Executes cross-validation or hold-out evaluations across modeling algorithms, computing standardized performance metrics (, , , Precision, Recall, , , , ).Predictions: Ingests a trained learner model and an unseen target-less dataset to output class probability scores and class predictions.Confusion Matrix: Renders error distribution tables comparing ground-truth target classes against predicted classes.- Unsupervised Category:
k-Means: Centroid-based partitioning clustering algorithm.Correlations: Computes pairwise Pearson correlation matrices across numerical variables.Hierarchical Clustering: Agglomerative clustering organizing observations into dendrogram hierarchies.- Specialized Add-on Categories:
Image Analytics:Import Images,Image Viewer,Image Embedding(extracts deep-feature vector embeddings using pre-trained convolutional models).Geo: Installs spatial mapping extensions includingGeo Map,Geocoding,Choropleth Map, andGeo Transformto render coordinate data atop interactive geographic base maps (e.g., OpenStreetMap).
Python & Google Colab Data Science Stack
Cloud Notebook Architecture: Google Colab
- Cloud-hosted Jupyter notebook service provided by Google running inside web browsers.
- Integrates direct computational hardware acceleration (free-tier cloud GPUs and TPUs subject to dynamic allocation caps and idle timeout rules).
- Execution model: Alternating arrangements of executable Code Cells and documentation-focused Text Cells (Markdown).
- Execution command: Pressing
<Shift> + <Enter>executes the active cell and advances focus to the subsequent cell. - File system interface:
python from google.colab import files uploaded = files.upload()
Core Data Science Libraries
- Pandas (
pandas as pd): - Primary tabular data manipulation engine providing the two-dimensional
DataFrameand one-dimensionalSeriesdata structures. - Core operations:
pd.read_csv('filepath', encoding='cp949'),df.head(),df.info(),df.describe(),df.isnull().sum(),df.iloc[:, :]index slicing. - NumPy (
numpy as np): - Fundamental computational foundation supporting high-performance N-dimensional array objects (
ndarray) and vectorized linear algebra operations. - Core operations:
np.mean(array),np.std(array), array indexing, mathematical transformations. - Matplotlib (
matplotlib.pyplot as plt): - Low-level 2D/3D visualization framework.
- Core operations:
plt.plot(x, y, marker='o'),plt.title(),plt.xlabel(),plt.ylabel(),plt.show(). - Seaborn (
seaborn as sns): - High-level statistical visualization library built directly atop Matplotlib.
- Core operations:
sns.countplot(x='column', data=df),sns.scatterplot(x='col1', y='col2', hue='class', data=df),sns.heatmap(df.corr(), annot=True),sns.pairplot(df),sns.boxplot(). - Scikit-learn (
sklearn): - Standard machine learning library providing estimators for regression, classification, clustering, dimensionality reduction, feature scaling, and model evaluation.
- Core modules:
sklearn.model_selection.train_test_split,sklearn.tree.DecisionTreeClassifier,sklearn.neighbors.KNeighborsClassifier,sklearn.linear_model.LinearRegression,sklearn.cluster.KMeans,sklearn.preprocessing.MinMaxScaler,sklearn.metrics.confusion_matrix,sklearn.metrics.silhouette_score. - Folium (
folium): - Dynamic geospatial data visualization library rendering Leaflet maps within Python.
- Core operations:
folium.Map(location=[lat, lon], zoom_start=2),folium.CircleMarker().add_to(map_obj).
- Pandas (
Model Performance Evaluation Metrics
- Binary Classification Confusion Matrix Topology
- A contingency table cross-tabulating actual ground-truth classes against algorithmic predictions:
True Positive (): Ground truth is Positive; model correctly predicts Positive.
True Negative (): Ground truth is Negative; model correctly predicts Negative.
False Positive ( - Type I Error): Ground truth is Negative; model incorrectly predicts Positive.
False Negative ( - Type II Error): Ground truth is Positive; model incorrectly predicts Negative.
- Classification Evaluation Metrics
Classification Accuracy ():
- Ratio of correct predictions over total predictions:
- Caveat: Misleading in class-imbalanced contexts (e.g., a dataset with normal emails and spam emails; a naive model predicting all emails as normal achieves accuracy while failing to detect any spam).
Precision (정밀도):
- Proportion of predicted positive instances that are truly positive:
- Evaluates prediction reliability. Highly prioritized when the operational cost of a False Positive is severe (e.g., spam filtering, where misclassifying an authentic business email as spam deletes critical information).
Recall (재현율 / 민감도 / Sensitivity):
- Proportion of actual positive instances captured by the model:
- Evaluates retrieval completeness. Highly prioritized when the operational cost of a False Negative is critical (e.g., malignant tumor detection, where classifying a sick patient as healthy delays lifesaving intervention).
F1-Score (조화 평균):
- The harmonic mean of Precision and Recall, balancing both metrics:
- Ranges within ; values approaching demonstrate balanced predictive capability across both precision and recall.
Receiver Operating Characteristic () Curve & Area Under the Curve ():
The curve plots the True Positive Rate () against the False Positive Rate () across all classification decision thresholds ( to ).
quantifies the probability that the classifier ranks a randomly chosen positive instance higher than a randomly chosen negative one.
Metric thresholds: denotes random coin-toss guessing; denotes exceptional discriminatory power; denotes perfect class separation.
Regression Evaluation Metrics
Measured against modeling residuals (), representing the error distance between observed ground truth and predicted value :
Mean Squared Error ():
- Average of squared prediction errors:
- Heavily penalizes large outlier errors due to the quadratic power term.
Root Mean Squared Error ():
- Square root of MSE, restoring the error metric to the original physical unit of the target variable:
Mean Absolute Error ():
- Unweighted arithmetic mean of absolute prediction errors:
- Measures average magnitude of errors linearly without disproportionately weighting outliers.
Coefficient of Determination ():
- Measures the proportion of variance in the dependent variable explained by independent features:
- Where is the Total Sum of Squares, is the Sum of Squared Errors (residual variance), and is the Regression Sum of Squares (explained variance).
- An approaching indicates near-complete explanatory power.
Decision Tree Modeling & Feature Importance
- Algorithmic Mechanics of Decision Trees (의사 결정 나무)
- Hierarchical, non-parametric supervised model that segments vector spaces through recursive sequential partitioning.
- Evaluates candidate splitting rules across feature thresholds to maximize child-node purity (homogeneity) and minimize impurity.

Advantages: High visual interpretability, no requirement for feature scaling, native handling of mixed numeric/categorical features, straightforward extraction of explicit IF-THEN logical rules.
- Case Study 1: Fisher's Iris Flower Classification
Dataset Provenance & Topology:
- Compiled in 1936 by British statistician/biologist Ronald Fisher from morphologic measurements collected by Edgar Anderson in Canada.
- Contains total observations comprising balanced botanical species ( samples each):
- Iris setosa
- Iris versicolor
- Iris virginica

- Attributes: continuous numeric features and categorical target:
sepal length (cm): 꽃받침 길이sepal width (cm): 꽃받침 너비petal length (cm): 꽃잎 길이petal width (cm): 꽃잎 너비species(target): 붓꽃 품종- Orange3 Visual Workflow Implementation:

Datasets(Iris)Select Columns(assign features and target)Data Table.- Pipeline connects to
Tree(induce binary tree, minimum leaf size = 2) andTest and Score(5-fold stratified cross-validation). - Downstream evaluation branches to
Tree Viewer,Feature Importance, andConfusion Matrix.- Structural Tree Rules Extracted:
- Root Node: Total sample count ( setosa, versicolor, virginica). Condition split:
petal length < 1.9. - Left Leaf Node:
petal length < 1.9isolates Iris setosa ( purity; terminal leaf). - Intermediate Branch:
petal length >= 1.9routes remaining samples ( versicolor, virginica) to second split:petal width < 1.7. - Subsequent Leaves:
petal width < 1.7yields a leaf with instances ( versicolor, virginica; versicolor purity);petal width >= 1.7yields a leaf with instances ( virginica, versicolor; virginica purity).- Validation Metrics (5-Fold Stratified Cross-Validation):
- (Classification Accuracy: )

- Confusion Matrix breakdown: *Setosa* ( correct), *Versicolor* ( correct, misclassified as virginica), *Virginica* ( correct, misclassified as versicolor).
Permutation Feature Importance Mechanics:
Measures the performance degradation of the trained tree model when values of an isolated feature are randomly shuffled (permuted), destroying its predictive correlation with the target while holding all other columns static.
The decrease in classification accuracy () signifies feature importance.
Error Bars (Black Bars): Represent variance (standard deviation across repeated permutation cycles). Short error bars indicate high measurement stability; long error bars indicate stochastic instability.
Empirical Iris findings:
petal length: Accuracy decreases by approximately upon permutation (the dominant primary feature).petal width: Accuracy decreases by approximately upon permutation (secondary critical feature).sepal length&sepal width: Accuracy degradation is near zero (), demonstrating minimal predictive contribution.
Case Study 2: European Hotel Booking Satisfaction Modeling
Dataset Overview:
- Acquired from Kaggle:
Europe Hotel Booking Satisfaction Score.csv. - Volume: rows across raw columns.
- Target Variable:
satisfaction(binary categorical:satisfiedvs.neutral or dissatisfied). - Feature Subset ( continuous 5-point survey dimensions):
Hotel wifi serviceDeparture/Arrival convenienceEase of Online bookingHotel locationFood and drinkStay comfortCommon Room entertainmentCheckin/Checkout serviceOther serviceCleanliness
- Excluded / Metadata Attributes ( columns):
id,Gender,Age,purpose_of_travel,Type of Travel,Type Of Booking.
- Acquired from Kaggle:
Orange3 Implementation Pipeline:
FileSelect Columns(Features: survey attributes; Target:satisfaction; Ignored: remaining attributes).Data Sampler: Split withFixed proportion of data = 70%andStratify sampleenabled outputs training rows (Data Sample) and test rows (Remaining Data).Treetrained onData Samplevisual inspection inTree Viewerreveals root split atHotel wifi service(threshold ).Test and Score(Cross-validation): Training accuracy evaluates to .Predictionsnode connects model fromTreeand test data fromData Sampler (Remaining Data): Evaluates test accuracy to .Confusion Matrixon test set: Correctly classifies neutral/dissatisfied instances and satisfied instances; misclassifies neutral/dissatisfied as satisfied () and satisfied as neutral/dissatisfied ().- Model Deployment / Inference: Load
hotel_satisfaction_new.csv(2 unseen unlabeled survey records) via a newFilewidget pipe toPredictionsoutputs: Instance 1 is predictedsatisfied, Instance 2 is predictedneutral or dissatisfied.
Python / Google Colab Script Pipeline: ```python import pandas as pd from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier from sklearn.metrics import classification_report, confusion_matrix
Ingest data
df = pd.read_csv('/content/Europe Hotel Booking Satisfaction Score.csv')
Select features and target
feature_cols = [ 'Hotel wifi service', 'Departure/Arrival convenience', 'Ease of Online booking', 'Hotel location', 'Food and drink', 'Stay comfort', 'Common Room entertainment', 'Checkin/Checkout service', 'Other service', 'Cleanliness' ] X = df[feature_cols] y = df['satisfaction']
Stratified 70/30 split
X_train, X_test, y_train, y_test = train_test_split( X, y, test_size=0.3, stratify=y, random_state=42 )
Fit Decision Tree model
dt = DecisionTreeClassifier(random_state=42) dt.fit(X_train, y_train) ```
- Quantitative Feature Importance Scores:
Extracted via
dt.feature_importances_:Hotel wifi service: (primary driver)Departure/Arrival convenience:Common Room entertainment:Hotel location:Other service:Checkin/Checkout service:Stay comfort:Cleanliness:Food and drink:Ease of Online booking:
Instance-Based Classification: k-Nearest Neighbors (kNN)
- Algorithmic Foundations & Distance Metrics
- Instance-based non-parametric supervised learning founded upon spatial proximity (homophily: similar data points cluster close together in feature space).
- Execution mechanism (4 stages):
- Distance Computation: Calculates spatial distance between an unseen query point and all points in the training set.
- Neighbor Identification: Ranks distances and identifies the closest training instances.
- Voting / Averaging Aggregation:
- Classification: Plurality majority vote across the labels of the neighbors.
- Regression: Arithmetic mean of target values across the neighbors.
- Output Generation: Returns predicted discrete class or continuous scalar.

Mathematical Distance Formulations ():
Euclidean Distance (최단 직선 거리):
Manhattan Distance (절대 좌표차 합 / L1 norm):
Chebyshev Distance (최대 좌표 편차):
Mahalanobis Distance (공분산 기반 거리, accounting for feature correlations):
Impact of Parameter & Selection Rules
Under-sizing (e.g., ): Decision boundary becomes intricate and hyper-localized, highly sensitive to noise and outliers; high risk of Overfitting (과대적합).
Over-sizing (e.g., ): Decision boundary flattens completely, predicting purely the majority global class; high risk of Underfitting (과소적합).
Square Root Heuristic (Rule of Thumb): Set initial baseline (e.g., if total training instances , initialize at ).
Odd Selection Rule: In binary classification problems, enforce odd integers () to structurally prevent tied voting states.
- Necessity of Feature Scaling
Distance metrics rely on absolute differences across vector components. Unscaled attributes with broad dynamic ranges dominate the distance computation, rendering narrower features irrelevant.
Standardization (Z-score Normalization): Sets mean and standard deviation . Highly robust to outliers because it preserves relative distribution variance without squashing into bounded intervals.
Min-Max Normalization: Compresses all observations into the interval . Highly sensitive to extreme outliers, which force valid operational observations into an artificially compressed dynamic range.
- Case Study 3: Palmer Archipelago Penguin Species Classification
Dataset Provenance & Topology:
- Acquired from Kaggle:
Palmer Archipelago (Antarctica) penguin data(penguins_size.csv). - Volume: rows, columns.
- Target:
species(categorical:Adelie,Chinstrap,Gentoo). - Morphological Attributes:
island: Biscoe, Dream, Torgersen.culmen_length_mm: 부리 길이 ()culmen_depth_mm: 부리 깊이 ()flipper_length_mm: 날개 길이 ()body_mass_g: 체질량 ()sex:MALE,FEMALE, alongside corrupted values.
- Acquired from Kaggle:
Data Inspection & Anomaly Cleaning:
- Dataset exhibits an overall missing rate of .
- Feature-level missingness:
culmen_length_mm(2),culmen_depth_mm(2),flipper_length_mm(2),body_mass_g(2),sex(10 true nulls). - Encoding anomaly: Row index contains an erroneous single-character string
'.'in thesexattribute. Python recognizes this as valid text, whereas Orange3 treats it as a missing value and drops it. Preprocessing removes rows with missing values, reducing total observations from to .
Orange3 Visual Modeling Pipeline:
FilePreprocess(Settings: Impute missing via Remove rows with missing values; Normalize features via Normalize to interval [0, 1]).Select Columns: Features =culmen_length_mm,culmen_depth_mm,flipper_length_mm; Target =species.Data Sampler: 70% stratified training split ( instances) and 30% holdout test split ( instances).kNNconfiguration: Number of neighbors = , Metric = Euclidean, Weight = Uniform.- Cross-validation on train split via
Test and Score(10-fold stratified) yields . Predictionson holdout test set ( instances) yields:

In the holdout confusion matrix, out of 20 actual Chinstrap penguins, 19 are correctly classified and 1 is misclassified as Adelie.
- Python / Google Colab Pipeline: ```python import pandas as pd from sklearn.model_selection import train_test_split, StratifiedKFold, cross_val_score from sklearn.preprocessing import MinMaxScaler from sklearn.neighbors import KNeighborsClassifier
Ingest and clean
df = pd.read_csv('penguins_size.csv').dropna() df = df[df['sex'] != '.'] # Clean erroneous string entry
X = df[['culmen_length_mm', 'culmen_depth_mm', 'flipper_length_mm']] y = df['species']
Partition and scale
X_train, X_test, y_train, y_test = train_test_split( X, y, test_size=0.3, stratify=y, random_state=0 ) scaler = MinMaxScaler() X_train_scaled = scaler.fit_transform(X_train) X_test_scaled = scaler.transform(X_test)
Systematic k-optimization via Stratified K-Fold CV
cv = StratifiedKFold(n_splits=10, shuffle=True, random_state=0) for k in range(2, 11): knn = KNeighborsClassifier(n_neighbors=k) scores = cross_val_score(knn, X_train_scaled, y_train, cv=cv) print(f'k: {k}, CV 평균 정확도: {scores.mean() * 100:.2f}%') ```
Cross-validation outputs:
- (optimal hyperparameter)
- Inference on Unseen Data (
penguin_new.csv):
Passing 3 unlabeled scaled morphometric observations through
knn.predict()yields:['Adelie', 'Chinstrap', 'Gentoo'].
Linear Regression & Price Forecasting
- Mathematical Foundations of Linear Regression
- Models continuous target variables as linear combinations of independent predictors :
- Simple Linear Regression:
- Multiple Linear Regression:
- Ordinary Least Squares () Optimization:
- The residual error for observation is the vertical distance between the observed coordinate and the regression line: .
- Direct summation of residuals causes positive and negative signs to cancel out. Consequently, minimizes the Sum of Squared Residuals ( / ):

- The candidate line minimizing squared residuals provides the best linear unbiased estimator.
- Case Study 4: Longitudinal Jajangmyeon Price Forecasting (Target: 2040)
- Macroeconomic Background & Problem Scope:
- In 2025, consumer prices for dining-out Jajangmyeon surged by , primarily driven by rising prices of base ingredients: flour, pork, and onions.
- Objective: Construct a Multiple Linear Regression model using historical macroeconomic indices (1975–2025) to predict the future price of Jajangmyeon in 2040.
- Data Ingestion & Multi-Source Synthesis:
- Source 1: Korean Statistical Information Service (KOSIS): Long-term Consumer Price Index () time series spanning 1975 to 2025 (), re-indexed to base year .
- Source 2: Baseline Retail Costs (Base Year 2020): Sourced via the Korea Consumer Agency Price Portal (참가격,
price.go.kr) and the Korea Institute for Animal Products Quality Evaluation (ekapepia.com):- Onion (양파 ):
- Pork Neck (돼지고기 목살 ):
- Flour (밀가루 ):
- Jajangmyeon (자장면 ): (recorded as in standard retail charts)
- Mathematical Feature Transformation:
- Translating dimensionless relative price indices () into estimated annual nominal retail prices ():
- Sample Transformation (Year 1975):
- Onion:
- Pork:
- Flour:
- Jajangmyeon:
- Sample Transformation (Year 2025):
- Onion:
- Pork:
- Flour:
- Jajangmyeon:
- Exploratory Correlation Analysis:

Bivariate Pearson correlation indicates Jajangmyeon price is most strongly correlated with temporal progression (
Year, ), followed by ingredient costs (Flour Price, ).- Orange3 Modeling Workflow:
File(자장면소비자물가지수(1975-2025).csv)Formula(computes nominal price columns)Select Columns(assignsYear,Onion Price,Pork Price,Flour Priceas Features;Jajangmyeon Priceas Target).Data Sampler: 70% training split () and 30% holdout test split ().Linear Regression(Fit intercept enabled) connects toData Sampler.Model performance on holdout test set (
Predictionswidget): .Model forecasts for future reference years:
- Year 2030:
- Year 2040:
- Year 2050:
- Python / Google Colab Pipeline: ```python import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score
Ingest transformed tabular data
df2 = pd.read_csv('jajangmyeon_prices.csv', encoding='cp949')
Map features and target
X = df2[['연도', '양파 가격', '돼지고기 가격', '밀가루 가격']] y = df2['자장면 가격']
Partition 70/30
X_train, X_test, y_train, y_test = train_test_split( X, y, test_size=0.3, random_state=42 )
Fit OLS regressor
model = LinearRegression(fit_intercept=True) model.fit(X_train, y_train)
Validate on test set
y_pred = model.predict(X_test) print('R2 Score:', r2_score(y_test, y_pred)) # Evaluates to 0.990 print('MSE:', mean_squared_error(y_test, y_pred)) # Evaluates to 42785.722 print('MAE:', mean_absolute_error(y_test, y_pred)) # Evaluates to 165.422 ```
- Ingesting forecasted macroeconomic ingredient matrices for future years:
Year 2030 ()
Year 2040 ()
Year 2050 ()
- Python model outputs a 2040 Jajangmyeon price forecast of .
Unsupervised Clustering: k-Means & Geospatial Analysis
- Algorithmic Mechanics of -Means Clustering
- An iterative, centroid-based partitioning algorithm that segments an unlabelled dataset into mutually exclusive clusters.

Execution sequence:
- Centroid Initialization: Select seed points in feature space as initial cluster centroids (via random selection or the heuristic).
- Cluster Assignment: Map every observational vector to its nearest centroid using squared Euclidean distance:
- Centroid Recomputation: Calculate new centroid coordinates as the arithmetic mean of all vectors assigned to that cluster:
- Convergence Evaluation: Repeat steps 2 and 3 until centroid coordinates stabilize (stabilization beneath a threshold ) or maximum iterations are exhausted.
- Techniques for Determining the Optimal Cluster Count ()
The Elbow Method (엘보우 방법):
- Computes the Within-Cluster Sum of Squares ( / Inertia) across expanding values of :
- Identifies the inflection point (the "elbow") where the marginal decrease in WCSS drops sharply.
The Silhouette Analysis (실루엣 방법):
Evaluates how tightly an observation clusters within its assigned group versus its separation from neighboring groups.
For observation in cluster :
- Intra-cluster Cohesion (): Average distance to all other points within the same cluster :
Inter-cluster Separation (): Mean distance to all points in the nearest neighboring cluster ():
Silhouette Coefficient Calculation ():
Mathematical Properties:
- If , (observation lies on the cluster boundary).
- If , (sample is tightly clustered within its own group and well-separated from others).
- If , (sample is closer to a neighboring cluster, indicating misclustering).
Worked Formulation Example:
- Given sample with intra-cluster cohesion and nearest inter-cluster separation :
The global Silhouette Score is the arithmetic mean of computed across all dataset instances. The optimal maximizes this average score.
Case Study 5: Global Seismic Activity Clustering
Dataset Overview:
- Sourced from Kaggle:
Significant Earthquakes, 1965-2016(database.csv). - Scope: Global seismic events recorded between January 2, 1965 and December 30, 2016 exhibiting Richter magnitude .
- Volume: rows across multi-source attributes.
- Attributes:
Date,Time,Latitude,Longitude,Type,Depth,Depth Error,Depth Seismic Stations,Magnitude,Magnitude Type,Magnitude Error,Magnitude Seismic Stations,Azimuthal Gap,Horizontal Distance,Horizontal Error,Root Mean Square,ID,Source,Location Source,Magnitude Source,Status. - Missingness profile: Substantial missing values across measurement error variables (e.g.,
Magnitude Errormissing ,Horizontal Errormissing ,Horizontal Distancemissing ,Depth Errormissing ). - Attribute distributions: Inspecting the categorical
Typecolumn shows standard seismic occurrences (Earthquake) vastly outnumber non-natural events (Explosion,Nuclear Explosion,Rock Burst).
- Sourced from Kaggle:
Orange3 Visual Modeling Pipeline:

- Ingestion:
Fileingestsdatabase.csv(, , , zero target variable). - Feature Isolation via
Select Columns: Features =Depth,Magnitude; Metas =Type,Latitude,Longitude. - Filtering via
Select Rows: Restrict to natural seismic events (Type equals Earthquake). - Sampling:
Data SamplerwithFixed sample size = 5000to prevent memory buffer overruns during real-time distance calculations. - Model Execution via
k-Means:- Number of clusters:
Fixed: 3 - Initialization:
Initialize with KMeans++ - Re-runs:
- Maximum iterations:
- Number of clusters:
- Visualizing Output Structure:
Scatter Plot: MapsDepthto the -axis,Magnitudeto the -axis, and colors points byCluster.

- `Geo Map` (installed via Add-ons `Geo`): Renders points over OpenStreetMap using `Latitude` and `Longitude`, coloring by `Cluster` and scaling marker diameter by `Magnitude`.
Cluster Taxonomy & Interpretation ():
- Cluster 0 (Green): Shallow Earthquakes (천발 지진). Focus depth: . Accounts for the highest density of seismic occurrences worldwide.
- Cluster 1 (Blue): Intermediate-Depth Earthquakes (중발 지진). Focus depth: .
- Cluster 2 (Orange): Deep-Focus Earthquakes (심발 지진). Focus depth: . Concentrated along deep subduction tectonic plate boundaries (e.g., the Western Pacific Rim, Tonga trench, Andean subduction zones).
Python / Google Colab Pipeline: ```python import pandas as pd import folium import matplotlib.pyplot as plt from sklearn.cluster import KMeans from sklearn.metrics import silhouette_score
Ingest seismic records
df = pd.read_csv('database.csv') df_quake = df[df['Type'] == 'Earthquake'].copy() X = df_quake[['Depth', 'Magnitude']].dropna()
Evaluate optimal cluster counts using Silhouette analysis
scores = [] for k in range(2, 8): km = KMeans(n_clusters=k, random_state=42, n_init=10) km.fit(X) score = silhouette_score(X, km.labels_) scores.append(score)
plt.plot(range(2, 8), scores, marker='o') plt.xlabel('Number of clusters') plt.ylabel('Silhouette Score') plt.show()
Fit primary 3-cluster model
km3 = KMeans(n_clusters=3, random_state=42, n_init=10) df_quake['Cluster'] = km3.fit_predict(X)
Generate interactive geospatial Folium map
m = folium.Map(location=[0, 0], zoom_start=2) colors = {0: 'green', 1: 'orange', 2: 'blue'} for _, row in df_quake.sample(1000, random_state=42).iterrows(): folium.CircleMarker( location=[row['Latitude'], row['Longitude']], radius=row['Magnitude'] * 0.8, color=colors[row['Cluster']], fill=True, fill_opacity=0.6 ).add_to(m) ```