copstressMin {cops}R Documentation

Fitting a COPS-C Model (COPS Variant 1).

Description

Minimizing Copstress to obtain a clustered MDS configuration with given hyperparameters theta.

Usage

copstressMin(delta, kappa = 1, lambda = 1, nu = 1, theta = c(kappa,
  lambda, nu), weightmat = 1 - diag(nrow(delta)), ndim = 2, init = NULL,
  stressweight = 0.975, cordweight = 0.025, q = 1, minpts = ndim + 1,
  epsilon = 10, rang = NULL, optimmethod = c("Nelder-Mead", "Newuoa"),
  verbose = 0, scale = c("sd", "rmsq", "std", "proc", "none"),
  normed = TRUE, accuracy = 1e-07, itmax = 1e+05,
  stresstype = c("stress-1", "stress"), ...)

Arguments

delta

numeric matrix or dist object of a matrix of proximities

kappa

power transformation for fitted distances

lambda

power transformation for proximities

nu

power transformation for weights

theta

the theta vector of powers; the first is kappa (for the fitted distances if it exists), the second lambda (for the observed proximities if it exist), the third is nu (for the weights if it exists) . If less than three elements are is given as argument, it will be recycled. Defaults to 1 1 1. Will override any kappa, lmabda, nu parameters if they are given and do not match

weightmat

(optional) a matrix of nonnegative weights; defaults to 1 for all off diagonals

ndim

number of dimensions of the target space

init

(optional) initial configuration

stressweight

weight to be used for the fit measure; defaults to 0.975

cordweight

weight to be used for the cordillera; defaults to 0.025

q

the norm of the corrdillera; defaults to 1

minpts

the minimum points to make up a cluster in OPTICS; defaults to ndim+1

epsilon

the epsilon parameter of OPTICS, the neighbourhood that is checked; defaults to 10

rang

range of the reachabilities to be considered. If missing it is found from the initial configuration by taking 0 as the lower boundary and 1.5 times the maximal reachability of the initial fit as upper boundary. If NULL it will be normed to each configuration's minimum and maximum distance as lower and upper bound respectively, so an absolute value of goodness-of-clusteredness. Note that the latter is not necessarily desirable when comparing configurations for their relative clusteredness. See also cordillera

optimmethod

What optimizer to use? Defaults to NEWUOA, Nelder-Mead is also supported.

verbose

numeric value hat prints information on the fitting process; >2 is very verbose

scale

Allows to scale the configuration for the OC. One of none (so no scaling), sd (configuration divided by the maximum standard deviation of the columns), std (standardize all columns !NOTE: This does not preserve the relative distances of the optimal config), proc (procrustes adjustment to the initial fit) and rmsq (configuration divided by the maximum root mean square of the columns). Default is sd.

normed

should the cordillera be normed; defaults to TRUE

accuracy

numerical accuracy, defaults to 1e-8

itmax

maximum number of iterations. Defaults to 100000

stresstype

which stress to use in the copstress. Defaults to stress-1. If anything else is set, explicitly normed stress which is (stress-1)^2. Using stress-1 puts more weight on MDS fit.

...

additional arguments to be passed to the optimization procedure

Value

A list with the components

Examples

dis<-as.matrix(smacof::kinshipdelta)

#Copstress with equal weight to stress and cordillera 
res1<-copstressMin(dis,stressweight=0.5,cordweight=0.5) 
res1
summary(res1)
plot(res1)  #super clustered


[Package cops version 0.1-2 Index]