Skip to content
/ stad Public

R implementation of STAD (Spanning Trees as Approximation of Data)

Notifications You must be signed in to change notification settings

vda-lab/stad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STAD

R implementation of STAD (Simplified Topological Approximation of Data)

Description

STAD generates an abstract representation of high-dimensional data by giving each data point a location in a graph which preserves the distances in the original high-dimensional space. The STAD graph is built upon the Minimum Spanning Tree (MST) to which new edges are added until the correlation between the graph and the original dataset is maximized. Additionally, STAD supports the inclusion of filter functions to focus the exploration and allow the analysis of data from new perspectives, emphasizing traits in data which otherwise would remain hidden.

Install

GitHub is not directly supported by the basic install.packages command. You could use the devtools package to install the development version of stad.

install.packages("devtools")
library("devtools")
install_github("vda-lab/stad")

Example

library(stad)
library(ggplot2)

# Circles dataset
data(circles)

ggplot(circles, aes(x,y, color = lens)) +
  geom_point()

circles_distance <- dist(circles[,c("x", "y")])

## STAD without lens
set.seed(10)
circles_nolens <- stad(circles_distance)
plot_graph(circles_nolens, layout = igraph::layout_with_kk )

## STAD with lens
set.seed(10)
circles_lens <- stad(circles_distance, filter_values = circles$lens, num_intervals = 5)
plot_graph(circles_lens, layout = igraph::layout_with_kk )

About

R implementation of STAD (Spanning Trees as Approximation of Data)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages