# mixspnorm: Finite Mixture of Spherical Normal Distributions In Riemann: Learning with Data on Riemannian Manifolds

## Description

For n observations on a (p-1) sphere in \mathbf{R}^p, a finite mixture model is fitted whose components are spherical normal distributions via the following model

f(x; ≤ft\lbrace w_k, μ_k, λ_k \right\rbrace_{k=1}^K) = ∑_{k=1}^K w_k SN(x; μ_k, λ_k)

with parameters w_k's for component weights, μ_k's for component locations, and λ_k's for component concentrations.

## Usage

 1 2 3 4 5 6 7 mixspnorm( data, k = 2, same.lambda = FALSE, variants = c("soft", "hard", "stochastic"), ... ) 

## Arguments

 data data vectors in form of either an (n\times p) matrix or a length-n list. See wrap.sphere for descriptions on supported input types. k the number of clusters (default: 2). same.lambda a logical; TRUE to use same concentration parameter across all components, or FALSE otherwise. variants type of the class assignment methods, one of "soft","hard", and "stochastic". ... extra parameters including maxiterthe maximum number of iterations (default: 50). epsstopping criterion for the EM algorithm (default: 1e-6). printera logical; TRUE to show history of the algorithm, FALSE otherwise.

## Value

a named list of S3 class mixspnorm containing

cluster

a length-n vector of class labels (from 1:k).

loglkd

log likelihood of the fitted model.

criteria

a vector of information criteria.

parameters

a list containing proportion, center, and concentration. See the section for more details.

membership

an (n\times k) row-stochastic matrix of membership.

## Parameters of the fitted model

A fitted model is characterized by three parameters. For k-mixture model on a (p-1) sphere in \mathbf{R}^p, (1) proportion is a length-k vector of component weight that sums to 1, (2) center is an (k\times p) matrix whose rows are cluster centers, and (3) concentration is a length-k vector of concentration parameters for each component.

## Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 # LOAD THE CITY DATA AND WRAP AS RIEMOBJ data(cities) locations = cities$cartesian embed2 = array(0,c(60,2)) for (i in 1:60){ embed2[i,] = sphere.xyz2geo(locations[i,]) } # FIT THE MODEL WITH DIFFERENT K's k2 = mixspnorm(locations, k=2) k3 = mixspnorm(locations, k=3) k4 = mixspnorm(locations, k=4) # VISUALIZE opar <- par(no.readonly=TRUE) par(mfrow=c(1,3)) plot(embed2, col=k2$cluster, pch=19, main="K=2") plot(embed2, col=k3$cluster, pch=19, main="K=3") plot(embed2, col=k4$cluster, pch=19, main="K=4") par(opar) 

Riemann documentation built on June 20, 2021, 5:07 p.m.