clusvis: This function estimates the parameters used for visualization

Description Usage Arguments Value Examples

View source: R/clusvis.R

Description

This function estimates the parameters used for visualization

Usage

1
2
clusvis(logtik.estim, prop = rep(1/ncol(logtik.estim), ncol(logtik.estim)),
  logtik.obs = NULL, maxit = 10^3, nbrandomInit = 12, nbcpu = 1)

Arguments

logtik.estim

matrix. It contains the probabilities of classification used for parameter inference (should be sampled from the model parameter or computed from the observations).

prop

vector. It contains the class proportions (by default, classes have same proportion).

logtik.obs

matrix. It contains the probabilities of classification of the clustered sample. If missing, logtik.estim is used.

maxit

numeric. It limits the number of iterations for the Quasi-Newton algorithm (default 1000).

nbrandomInit

numeric. It defines the number of random initialization of the Quasi-Newton algorithm.

nbcpu

numeric. It specifies the number of CPU (only for linux)

Value

Returns a list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## Not run: 
 ####### First example with VarSelLCM
 # Package loading
 require(VarSelLCM)

 # Data loading (categorical data)
 data("congress")
 # Model-based clustering with 3 components
 res <- VarSelCluster(congress, 3)

 # Inference of the parameters used for results visualization
 # (specific for Rmixmod results)
 # It is better because probabilities of classification are generated
 # by using the model parameters
 resvisu <- clusvisVarSelLCM(res)

 # Component interpretation graph
 plotDensityClusVisu(resvisu)

 # Scatter-plot of the observation memberships
 plotDensityClusVisu(resvisu,  add.obs = TRUE)

 ####### Second example with Rmixmod
### Package loading
require(Rmixmod)
 
# Data loading (categorical data)
data(birds)

# Model-based clustering with 3 components
resmixmod <- mixmodCluster(birds, 3)

# Inference of the parameters used for results visualization (general approach)
# Probabilities of classification are not sampled from the model parameter,
# but observed probabilities of classification are used for parameter estimation
resvisu <- clusvis(log(resmixmod@bestResult@proba),
                   resmixmod@bestResult@parameters@proportions)



## End(Not run)

ClusVis documentation built on April 19, 2018, 3:01 a.m.