NNS.part: NNS Partition Map

Description Usage Arguments Value Author(s) References Examples

View source: R/Partition_Map.R

Description

Creates partitions based on partial moment quadrant means, iteratively assigning identifications to observations based on those quadrants (unsupervised partitional and hierarchial clustering method). Basis for correlation NNS.cor, dependence NNS.dep, regression NNS.reg routines.

Usage

1
2
NNS.part(x, y, Voronoi = FALSE, type = NULL, order = NULL,
  max.obs.req = 4, min.obs.stop = FALSE, noise.reduction = "mean")

Arguments

x

a numeric vector.

y

a numeric vector with compatible dimsensions to x.

Voronoi

logical; FALSE (default) Displays a Voronoi type diagram using partial moment quadrants.

type

NULL (default) Controls the partitioning basis. Set to (type = "XONLY") for X-axis based partitioning. Defaults to NULL for both X and Y-axis partitioning.

order

integer; Number of partial moment quadrants to be generated. (order = "max") will institute a perfect fit.

max.obs.req

integer; (4 default) Required observations per cluster where quadrants will not be further partitioned if observations are not greater than the entered value. Reduces minimum number of necessary observations in a quadrant to 1 when (max.obs.req = 1).

min.obs.stop

logical; FALSE (default) Stopping condition where quadrants will not be further partitioned if a single cluster contains less than the entered value of max.obs.req.

noise.reduction

the method of determing regression points options: ("mean", "median", "mode", "off"); (noise.reduction = "median") uses medians instead of means for partitions, while (noise.reduction = "mode") uses modes instead of means for partitions. Defaults to (noise.reduction = "mean"), while (noise.reduction = "off") will partition quadrant to a single observation for a given (order = ...).

Value

Returns:

Author(s)

Fred Viole, OVVO Financial Systems

References

Viole, F. and Nawrocki, D. (2013) "Nonlinear Nonparametric Statistics: Using Partial Moments" http://amzn.com/1490523995

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
set.seed(123)
x <- rnorm(100) ; y <- rnorm(100)
NNS.part(x, y)

## Data.table of observations and partitions
NNS.part(x, y, order = 1)$dt

## Regression points
NNS.part(x, y, order = 1)$regression.points

## Voronoi style plot
NNS.part(x, y, Voronoi = TRUE)

## Examine final counts by quadrant
DT = NNS.part(x, y)$dt
DT[ , counts := .N, by = quadrant]
DT

NNS documentation built on May 15, 2018, 5:04 p.m.