Learn R Programming

spinebil

Studying Projection Pursuit INdex functions through Exploration Based on Interpolated tour paths and Line graphs. spinebil provides functionalities to evaluate the performance of projection pursuit index functions using tour methods as presented in this paper.

Installation

You can install the released version of spinebil from CRAN with:

install.packages("spinebil")

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("uschiLaa/spinebil")

Example

To evaluate the index behaviour on a known input distribution we can trace its value when interpolating a tour path, for example moving from nuisance and structured projection.

library(spinebil)
## sample from the spiral distribution
d <- spiralData(4, 100)
## the first two parameters are noise
## parameters 3 and 4 contain a spiral
## we write a list with the nuisance and structured plane
m <- list(basisMatrix(1,2,4), basisMatrix(3,4,4))
## the index functions to be evaluated should also be passed in a list
indexList <- list(tourr::holes(), tourr::cmass())
indexLabels <- c("holes", "cmass")
## we can now compute the index traces and plot them
trace <- getTrace(d, m, indexList, indexLabels)
#> target_dist - cur_dist: 0 
#> generation:  dist =   1.03966 
#> target_dist - cur_dist: 1.03966 
#> generation:  dist =   1.533671 
#> target_dist - cur_dist: 0 
#> generation:  dist =   2 
#> target_dist - cur_dist: 0 
#> target_dist - cur_dist: 0 
#> generation:  dist =   2 
#> target_dist - cur_dist: 2 
#> target_dist - cur_dist: 1.95 
#> target_dist - cur_dist: 1.9 
#> target_dist - cur_dist: 1.85 
#> target_dist - cur_dist: 1.8 
#> target_dist - cur_dist: 1.75 
#> target_dist - cur_dist: 1.7 
#> target_dist - cur_dist: 1.65 
#> target_dist - cur_dist: 1.6 
#> target_dist - cur_dist: 1.55 
#> target_dist - cur_dist: 1.5 
#> target_dist - cur_dist: 1.45 
#> target_dist - cur_dist: 1.4 
#> target_dist - cur_dist: 1.35 
#> target_dist - cur_dist: 1.3 
#> target_dist - cur_dist: 1.25 
#> target_dist - cur_dist: 1.2 
#> target_dist - cur_dist: 1.15 
#> target_dist - cur_dist: 1.1 
#> target_dist - cur_dist: 1.05 
#> target_dist - cur_dist: 1 
#> target_dist - cur_dist: 0.95 
#> target_dist - cur_dist: 0.9 
#> target_dist - cur_dist: 0.85 
#> target_dist - cur_dist: 0.8 
#> target_dist - cur_dist: 0.75 
#> target_dist - cur_dist: 0.7 
#> target_dist - cur_dist: 0.65 
#> target_dist - cur_dist: 0.6 
#> target_dist - cur_dist: 0.55 
#> target_dist - cur_dist: 0.5 
#> target_dist - cur_dist: 0.45 
#> target_dist - cur_dist: 0.4 
#> target_dist - cur_dist: 0.35 
#> target_dist - cur_dist: 0.3 
#> target_dist - cur_dist: 0.25 
#> target_dist - cur_dist: 0.2 
#> target_dist - cur_dist: 0.15 
#> target_dist - cur_dist: 0.1 
#> target_dist - cur_dist: 0.05
plotTrace(trace)

Copy Link

Version

Install

install.packages('spinebil')

Monthly Downloads

162

Version

0.1.6

License

GPL-3

Maintainer

Tina Rashid Jafari

Last Published

July 11th, 2025

Functions in spinebil (0.1.6)

plotTrace

Plot traces of indexes obtained with getTrace.
basisVector

Generate basis vector in direction i in n dimensions (i <= n)
squintAngleEstimate

Estimating squint angle of 2-d structure in high-d dataset under selected index.
jitterPoints

Re-evaluate index after jittering all points by an amount alpha.
plotRotation

Plot rotation traces of indexes obtained with profileRotation.
plotSmoothingComparison

Plot the comparison of smoothing methods.
sinData

Generating sine wave sample
scagIndex

Matching index functions to the required format.
step_fraction

Step along an interpolated path by fraction of path length.
timeSequence

Time each index evaluation for projections in the tour path.
distanceDist

Collecting all pairwise distances between input planes.
basisMatrix

Generate 2-d basis in directions i, j in n dimensions (i,j <= n)
compareSmoothing

Compare traces with different smoothing options.
jitterAngle

Re-evaluate index after jittering the projection by an angle alpha.
getIndexMean

Evaluate mean index value over n jittered views.
getTrace

Tracing the index over an interpolated planned tour path.
basis_nearby

Generate nearby bases, e.g. for simulated annealing.
geodesic_info

Calculate information required to interpolate along a geodesic path between two frames.
distanceToSp

Collecting distances between input planes and input special plane.
profileRotation

Test rotation invariance of index functions for selected 2-d data set.
spiralData

Generating spiral sample
spinebil-package

spinebil
pipeData

Generating a sample of points on a pipe