0% found this document useful (0 votes)
4 views46 pages

Lecture Note 9

The document discusses various techniques for data filtering and querying, including dynamic queries, scented widgets, and sketch-based queries. It also covers clustering methods such as K-means and DBScan, as well as dimensionality reduction techniques like Principal Component Analysis (PCA). Additionally, it highlights the importance of aggregation and visualization in data analysis.

Uploaded by

sladier132
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views46 pages

Lecture Note 9

The document discusses various techniques for data filtering and querying, including dynamic queries, scented widgets, and sketch-based queries. It also covers clustering methods such as K-means and DBScan, as well as dimensionality reduction techniques like Principal Component Analysis (PCA). Additionally, it highlights the importance of aggregation and visualization in data analysis.

Uploaded by

sladier132
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Filter

elements are eliminated


What drives filters?
Any possible function that partitions a
dataset into two sets
Bigger/smaller than x
Fold-change
Noisy/insignificant
Dynamic Queries / Filters
coupling between encoding and interaction so that user can
immediately see the results of an action

Queries: start with 0, add in elements


Filters: start with all, remove elements
Approach depends on dataset size
ITEM FILTERING

Ahlberg 1994
Scented Widgets
information scent: user’s (imperfect) perception of data
GOAL: lower the cost of information foraging
through better cues

Willett 2007
Item Filtering with Scented
Widgets

[Link]
Interactive Legends
Controls combining the visual representation of static
legends with interaction mechanisms of widgets
Define and control visual display together

Riche 2010
Text & Dynamic Queries
Sketch-based Queries
Idea: we have a mental
model of a pattern.
Let user sketch it!

[Link]
Sketch-based Queries
Time Series

[Link]

[Mannino, Abouzied, 2018]


Aggregation
Aggregate
a group of elements is represented by a (typically smaller)
number of derived elements
Why Aggregate?
Recall Tabular Aggregation
Spatial Aggregation
modifiable areal unit problem
in cartography, changing the boundaries of the regions used to analyze data
can yield dramatically different results
A real district in Pennsylvania
Democrats won 51% of the vote
but only 5 out of 18 house seats
Gerrymandering in PA
Updated Map after Court Decision

[Link]
Valid till 2002

[Link]
1794525-155/lake-salt-republican-
20 county-http-utah
2016 Congressional Elections

[Link]
Voronoi Diagrams
Given a set of locations, for
which area is a location n
closest?

D3 Voronoi Layout:
[Link]
Voronoi Examples
Voronoi for
Interaction
Useful for interaction:
Increase size of target area to
click/hover
Instead of clicking on point,
hover in its region

[Link]
Clustering
Clustering
Classification of items into “similar” Hierarchical Algorithms
bins
Produce “similarity tree” –
Based on similarity measures dendrogram
Euclidean distance, Pearson
correlation, ... Bi-Clustering
Partitional Algorithms Clusters dimensions & records
divide data into set of bins Fuzzy clustering
# bins either manually set (e.g., k-
means) or automatically determined
allows occurrence of elements
(e.g., affinity propagation) in multiples clusters
Clustering Applications
Clusters can be used to
order (pixel based techniques)
brush (geometric techniques)
aggregate
Aggregation
cluster more homogeneous than whole dataset
statistical measures, distributions, etc. more meaningful
Clustered Heat Map
Cluster Comparison
Example: K-Means
Goal: Minimize aggregate intra-custer distance (inertia)

total squared distance from point to center of its cluster


for euclidian distance: this is the variance
measure of how internally coherent clusters are
Lloyd’s Algorithm
Input: set of records x1 … xn, and k (nr clusters)
Pick k starting points as centroids c1 … ck
While not converged:
1. for each point xi find closest centroid cj
• for every c calculate distance D(x c )
j i, j

• assign x to cluster j defined by smallest distance


i

2. for each cluster j, compute a new centroid cj


by calculating the average of all xi assigned to cluster j
Repeat until convergence, e.g.,
no point has changed cluster
distance between old and new centroid below threshold
number of max iterations reached
1. Initialization
2. Assign Clusters

4. Assign Clusters
3. Update Centroids

And repeat until converges


Illustrated

[Link]
Choosing K, Initializing

Initializing: Farthest Point Strategy


Choosing K: looking for drop-off in Intra-Cluster Distance Reduction
Evaluating Intra-Cluster Distance
Properties
Lloyds algorithm doesn’t find a global optimum
Instead it finds a local optimum
It is very fast:
common to run multiple times and pick the solution with the minimum
inertia
K-Means Properties
Assumptions about data:
roughly “circular” clusters of
equal size

[Link]
K-Means Unequal Cluster Size

[Link]
DBScan
Density-based spatial clustering of
applications with noise
Idea: Clusters are dense groups
if point belongs to a cluster, it should be near
to lots of other points in that cluster.
Parameters:
Epsilon: if new point distance to closest point in
cluster is < epsilon, add to cluster
Min points: what’s the smallest cluster (outliers)

[Link]
Hierarchical Clustering
Two types:
agglomerative clustering
start with each node as a cluster and merge
divisive clustering
start with one cluster, and split
Agglomerative Clustering Idea

A C
B D E

A B C D E F
[Link]
Linkage Criteria
How do you define similarity between two clusters to be
merged (A and B)?
• maximum linkage distance: two elements that are apart the
furthest
• use minimum linkage distance: the two closest elements
• use average linkage distance
• use centroid distance
Dimensionality
Reduction
Dimensionality Reduction
Reduce high dimensional to
lower dimensional space
Preserve as much of variation
as possible
Plot lower dimensional space
Principal Component Analysis
(PCA)
linear mapping, by order of variance
PCA

You might also like