Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/findThreshold.R
Identify a distance threshold predicting whether a pairwise distance represents a comparison between objects in the same class (withingroup comparison) or different classes (betweengroup comparison) given a matrix providing distances between objects and the group membership of each object.
1 2 3 4 5 6 
dmat 
Square matrix of pairwise distances. 
groups 
Object coercible to a factor identifying group
membership of objects corresponding to either edge of 
include 
vector (numeric or boolean) indicating which elements to retain in the output; comparisons including an excluded element will have a value of NA 
distances 
Optional output of 
method 
The method for calculating the threshold; only 'mutinfo' is currently implemented. 
prob 
Sets the upper and lower bounds of D as some quantile of the within class distances and betweenclass differences, respectively. 
na.rm 
If TRUE, excludes 
keep.dists 
If TRUE, the output will contain the 
roundCuts 
Number of digits to round cutoff values (see Details) 
minCuts 
Minimal length of vector of cutoffs (see Details). 
maxCuts 
Maximal length of vector of cutoffs (see Details) 
targetCuts 
Length of vector of cutoffs if conditions met by

verbose 
Terminal output is produced if TRUE. 
depth 
Private argument used to track level of recursion. 
... 
Extra arguments are ignored. 
findThreshold
is used internally in classify
, but
may also be used to calculate a starting value of $D$.
partition
is used to transform a square (or lower triangular)
distance matrix into a data.frame
containing a column of
distances ($vals
) along with a factor ($comparison
)
defining each distance as a within or betweengroup
comparison. Columns $row
and $col
provide indices of
corresponding rows and columns of dmat
.
In the case of findThreshold
, output is a list with elements
decsribed below. In the case of partition
, output is the data.frame
returned as the element named $distances
in the output of
findThreshold
.
D 
The distance threshold (distance cutoff corresponding to the PMMI). 
pmmi 
Value of the point of maximal mutual information (PMMI) 
interval 
A vector of length 2 indicating the upper and lower bounds over which values for the threshold are evaluated. 
breaks 
A 
distances 
If 
method 
Character corresponding to input argument 
params 
Additional input parameters. 
Noah Hoffman
1 2 3 4 5 
List of 7
$ D : num 2.04
$ pmmi : num 0.395
$ interval : num [1:2] 0.837 3.401
$ breaks :'data.frame': 259 obs. of 2 variables:
..$ x: num [1:259] 0.837 0.84 0.85 0.86 0.87 ...
..$ y: num [1:259] 0.238 0.24 0.243 0.246 0.25 ...
$ distances:'data.frame': 11175 obs. of 4 variables:
..$ vals : num [1:11175] 0.539 0.51 0.648 0.141 0.616 ...
..$ comparison: Ord.factor w/ 2 levels "within"<"between": 1 1 1 1 1 1 1 1 1 1 ...
..$ row : int [1:11175] 1 1 1 1 1 1 1 1 1 1 ...
..$ col : int [1:11175] 2 3 4 5 6 7 8 9 10 11 ...
$ method : chr "mutinfo"
$ params :List of 5
..$ prob : num 0.5
..$ roundCuts : num 2
..$ minCuts : num 20
..$ maxCuts : num 300
..$ targetCuts: num 100
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.