add documentation (remove .gitignore under man/)
[synclust.git] / man / findSyncVarRegions.Rd
1 % Generated by roxygen2 (4.0.2): do not edit by hand
2 \name{findSyncVarRegions}
3 \alias{findSyncVarRegions}
4 \title{Direct clustering from a neighborhoods graph, or get regions from (Poisson)
5 distribution parameters optimization, using convex relaxation.}
6 \usage{
7 findSyncVarRegions(method, M, k, alpha, gmode, K, dtype, cmeth, pcoef = 1,
8 h = 0.001, eps = 0.001, maxit = 1000, showLL = TRUE, disp = TRUE)
9 }
10 \arguments{
11 \item{method}{Global method: "direct" or "convex"}
12
13 \item{M}{Matrix of observations in rows, the two last columns
14 corresponding to geographic coordinates;
15 set to NULL to use our initial dataset (625 rows / 9 years)}
16
17 \item{k}{Number of neighbors}
18
19 \item{alpha}{Weight parameter for intra-neighborhoods distance computations;
20 0 = take only geographic coordinates into account;
21 1 = take only observations over the years into account;
22 in-between : several levels of compromise;
23 -1 or any negative value : use a heuristic to choose alpha.}
24
25 \item{gmode}{Neighborhood type. 0 = reduced [mutual] kNN; 1 = augmented kNN (symmetric);
26 2 = normal kNN; 3 = one NN in each quadrant; (NON-symmetric).
27 NOTE: gmode==3 automatically sets k==4 (at most!)}
28
29 \item{K}{Number of clusters}
30
31 \item{dtype}{Distance type, in {"simple","spath","ectd"}.
32 NOTE: better avoid "simple" if gmode>=2}
33
34 \item{cmeth}{Clustering method, in {"KM","HC","spec"} for k-means (distances based)
35 or hierarchical clustering, or spectral clustering (only if gmode>=2)}
36
37 \item{pcoef}{Penalty value for convex optimization [default: 1.0]}
38
39 \item{h}{Step in the min LL algorithm [default: 1e-3]}
40
41 \item{eps}{Threshold to stop min.LL iterations [default: 1e-3]}
42
43 \item{maxit}{Maximum number of iterations in the min LL algo [default: 1e3]}
44
45 \item{showLL}{Print trace of log-likelihood evolution [default: true]}
46
47 \item{disp}{True [default] for interactive display (otherwise nothing gets plotted)}
48 }
49 \value{
50 list with the following entries. M: data matrix in input; NI: computed neighborhoods;
51 dists: computed distances matrix; clusts: partition into K clusters, as an integer vector;
52 cxpar: parameters obtained after convex optimization (if applicable)
53 }
54 \description{
55 Direct clustering from a neighborhoods graph, or get regions from (Poisson)
56 distribution parameters optimization, using convex relaxation.
57 }
58 \examples{
59 cvr = findSyncVarRegions("convex",M=NULL,k=10,alpha=0.1,gmode=1,K=5,dtype="spath",cmeth="HC")
60 drawMapWithSitez(cvr$M, cvr$clusters)
61 drawNeighboroodGraph(cvr$M, cvr$NI)
62 }
63