1/151
Looks like no tags are added yet.
Cluster Analysis
A technique that uses algorithms to divide a larger population into smaller groups based on shared characteristics.
Market Segmentation
The process of dividing consumer or business markets into smaller groups with shared characteristics.
Purpose of Cluster Analysis
To identify hidden patterns and structures in data and create homogeneous subgroups.
Intra-cluster Homogeneity
The similarity of observations within the same cluster.
Inter-cluster Heterogeneity
The differences between observations belonging to different clusters.
Distance Measures
Measures used to calculate similarity or dissimilarity between observations or clusters.
Distance and Similarity
Smaller distances between observations represent greater similarity.
Unsupervised Learning
A type of learning in which no established dependent variable is specified.
Why Is Cluster Analysis Unsupervised?
Because it identifies groups in data without using a predefined target or dependent variable.
K-Means Clustering
A clustering method that groups observations around cluster centroids and minimizes the distance between observations and their assigned centroid.
Cluster Centroid
The central point of a cluster, calculated using the mean values of the observations in that cluster.
K-Means: Step 1
Decide the number of clusters (k) and create initial points arbitrarily.
K-Means: Step 2
Treat the initial points as centroids and assign each observation to its closest centroid.
K-Means: Step 3
Calculate new cluster centroids by computing the overall means of the observations in each cluster.
K-Means: Step 4
Reassign observations based on their distances to the new centroids.
K-Means: Step 5
Repeat the calculation and reassignment process until the clustering no longer changes.
Elbow Chart
A line chart used to evaluate the reduction in cluster error and help assess the number of clusters.
Data Standardization
The process of converting variables into comparable measures so differences in measurement scales do not dominate the clustering process.
Why Standardize Data Before Clustering?
Variables may use different measurement scales, so standardization makes them comparable.
Z-Score Standardization
A standardization method that expresses values in terms of how many standard deviations they are from the mean.
Min-Max Standardization
A method that rescales values to a common range.
Why Does K-Means Require Numerical Data?
K-means uses means to calculate centroids, and means are meaningful only for numerical data.
Why Are Categorical Variables Unsuitable for K-Means?
The mean of category codes does not have a meaningful interpretation.
Hierarchical Clustering
A clustering method that combines individual observations into subgroups using measures of distance.
Agglomerative Clustering
A bottom-up hierarchical method that starts with every observation as a separate cluster and progressively combines clusters.
Divisive Clustering
A top-down hierarchical method that starts with all observations in one cluster and progressively divides them.
Agglomerative vs. Divisive Clustering
Agglomerative clustering combines separate clusters, whereas divisive clustering divides one large cluster into smaller clusters.
Euclidean Distance
The straight-line distance between two points.
Manhattan Distance
The distance between two points measured along a path with right-angle turns, similar to walking on a city grid.
Matching Method
A similarity measure that compares two observations based on the minimum differences between their values.
Jaccard's Method
A method that measures similarity between two observations based on how dissimilar they are from each other.
Linkage Criterion
A method used to measure the distance between clusters in hierarchical clustering.
Complete Linkage
Defines cluster similarity using the maximum distance between observations in two different clusters.
Single Linkage
Defines cluster similarity using the shortest distance between an observation in one cluster and an observation in another cluster.
Average Linkage
Defines cluster similarity using the average distance between observations in one cluster and all observations in another cluster.
Complete vs. Single Linkage
Complete linkage uses the maximum distance between clusters, while single linkage uses the shortest distance.
Dendrogram
A tree-like diagram that illustrates the results of hierarchical clustering.
Choosing the Number of Clusters with a Dendrogram
Identifying the correct number of clusters using a dendrogram is subjective.
K-Means vs. Hierarchical Clustering
K-means works only with numerical data, while hierarchical clustering can handle both numerical and categorical data.
Standardization in Hierarchical Clustering
Hierarchical clustering should also be performed using standardized data, such as z-scores or min-max values.
Decision Tree
A supervised data mining technique that uses a tree structure to classify or predict outcomes based on predictor variables.
Supervised Learning
A type of learning that uses data with a known target variable to build a model.
Main Characteristics of Decision Trees
They are displayed as tree diagrams, are relatively easy to interpret and represent a set of if-then rules.
If-Then Rules
Decision rules that describe the conditions under which a particular outcome is predicted.
Root Node
The top node of a decision tree where the first split is applied.
Interior Node
A node where additional decision rules and splits are applied.
Leaf Node / Terminal Node
The final node of a decision tree where a classification or prediction is given and no further splitting occurs.
Recursive Partitioning
The process of repeatedly splitting cases into increasingly homogeneous subgroups.
Pure Subset
A subset containing cases with the same value of the target variable.
Why Stop Splitting a Pure Subset?
There is no need to split it further because all cases already have the same target value.
Why Is Recursive Partitioning Called Recursive?
Because every split depends on the previous splits.
When Might Pure Subsets Be Impossible?
When identical observations have different values of the target variable.
CART
Classification and Regression Trees; an algorithm that repeatedly splits cases into increasingly homogeneous subsets.
Binary Tree
A tree in which each decision node has two branches.
Why Are CART Trees Binary?
Each decision node produced by CART has two branches.
Classification Tree
A decision tree used when the target variable is categorical.
Regression Tree
A decision tree used when the target variable is numerical.
Classification vs. Regression Trees
Classification trees predict class membership, while regression trees predict numerical outcomes.
Training Data
The data used to build the decision tree and identify optimal splits.
Validation Data
The data used to evaluate and optimize the complexity of the decision tree.
Test Data
The data set used to assess the final model's predictive performance.
Purpose of Training Data
To grow the decision tree by selecting optimal splits.
Purpose of Validation Data
To optimize tree complexity and identify a tree that predicts accurately without unnecessary complexity.
Purpose of Test Data
To evaluate the predictive performance of the final model.
Optimal Split
The split that produces the most homogeneous resulting subsets according to the selected impurity measure.
Full Tree / Maximal Tree
A tree grown until no further splits can be made and the leaf nodes contain cases with the same class or outcome.
Overfitting
When a model becomes too complex and performs poorly when predicting new observations.
Why Does a Full Tree Tend to Overfit?
Branches near the end of the tree may be based on very few observations and capture patterns that do not generalize to new data.
Pruning
The process of removing branches from a decision tree to reduce complexity and improve predictions on new data.
Purpose of Pruning
To prevent overfitting and improve the model's ability to generalize to new observations.
Candidate Trees
A set of trees with different levels of complexity created during the pruning process.
Minimum Error Tree
The least complex tree that has the smallest validation error.
Best-Pruned Tree
The least complex tree whose validation error is within one standard deviation of the minimum error tree.
How Is the Final Tree Selected?
The validation data is used to compare candidate trees, and the best-pruned tree can be selected as the final model.
Pre-Pruning
Stopping tree growth before it becomes fully developed.
Post-Pruning
Growing a full tree first and then removing branches to reduce complexity.
CART: Strengths
Can handle categorical and numerical target variables, is easy to interpret, automatically selects important predictors, makes no assumptions about relationship types, handles incomplete data and is not affected by outliers.
CART: Weaknesses
Requires a large training data set, can have high computational costs, and small changes in training data can produce drastically different trees.
Automatic Predictor Selection
CART automatically identifies the most discriminating predictor variables through recursive partitioning and pruning.
Classification Tree Impurity
A measure of how mixed the target classes are within a subset.
Pure Classification Subset
A subset in which all cases belong to the same class.
Highest Impurity in Binary Classification
Occurs when the two classes are equally represented.
Possible Split Points for Numerical Predictors
CART uses the midpoints between consecutive values of numerical predictor variables.
Possible Split Points for Categorical Predictors
Splits are based on groupings of categories.
Goal of a Classification Tree Split
To identify the partition that minimizes impurity in the resulting subsets.
Gini Impurity Index
A measure of the degree of impurity in a set of cases in a classification problem.
Gini Index Formula
Gini = 1 − Σ(pk²), where pk is the proportion of cases belonging to class k.
Meaning of pk
The proportion of all cases that belong to class k.
Meaning of m
The number of classes in the classification problem.
Gini Index of 0
Indicates the highest purity and lowest impurity.
Gini Index of 0.5 in Binary Classification
Indicates the highest impurity and lowest purity.
How Does CART Use the Gini Index?
It compares the Gini index of all possible splits and selects the split that produces the smallest value.
Weighted Gini Index
The combined impurity of the resulting subsets, weighted according to the proportion of cases in each subset.
Why Use a Weighted Gini Index?
Because the resulting subsets may contain different numbers of observations, so their impurity must be weighted by their sizes.
Training Misclassification Rate
Generally decreases as the number of tree partitions increases and can eventually reach zero.
Validation Misclassification Rate
May initially decrease as the tree grows but can increase later because of overfitting.
Why Can Validation Error Increase as a Tree Grows?
A more complex tree may overfit the training data and perform worse on new data.
Pruning a Classification Tree
Can reduce validation misclassification by replacing a branch with a leaf node.
Regression Tree Target Variable
A numerical variable.
Prediction in a Regression Tree
The predicted value is the average target value of the cases belonging to the same leaf node.