Quantcast

Von Mises mixtures: mu and kappa?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Von Mises mixtures: mu and kappa?

peter.mills
Hello

I am trying to calculate the values of the concentration parameters (kappa) and preferred direction (mu) for a Von Mises mixture model. I currently have some R code that gives me optimised values for the product of kappa and mu, but I'm not sure how to calculate them when both are unknown? How could I calculate mu and kappa from y2 if I didn't know either in the 1st place? I what to use movMF to give me values of kappa from some directional data where I don't know either kappa or mu.


## Generate and fit a "small-mix" data set a la Banerjee et al.
mu <- rbind(c(-0.251, -0.968),
            c(0.399, 0.917))
kappa <- c(4, 4)

theta <- kappa * mu
theta
alpha <- c(0.48, 0.52)

## Generate a sample of size n = 50 from the von Mises-Fisher mixture
## with the above parameters.
set.seed(123)
x <- rmovMF(50, theta, alpha)
## Fit a von Mises-Fisher mixture with the "right" number of components,
## using 10 EM runs.
y2 <- movMF(x, 2, nruns = 10)

Y2 gives
> y2
theta:
       [,1]      [,2]
1  2.443225  5.259337
2 -1.851384 -4.291278
alpha:
[1] 0.4823648 0.5176352
L:
[1] 24.98124

How could I calculate kappa and mu if I didn't know either in the 1st place?

Thanks
Peter


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Von Mises mixtures: mu and kappa?

Bert Gunter-2
Please search before posting!

Searching "von mises mixture distributions" on rseek.org brought up
what appeared to be several relevant hits. If none of these meet your
needs, you should probably explain why not in a follow up post.

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Feb 14, 2017 at 8:55 AM, Peter Mills <[hidden email]> wrote:

> Hello
>
> I am trying to calculate the values of the concentration parameters (kappa) and preferred direction (mu) for a Von Mises mixture model. I currently have some R code that gives me optimised values for the product of kappa and mu, but I'm not sure how to calculate them when both are unknown? How could I calculate mu and kappa from y2 if I didn't know either in the 1st place? I what to use movMF to give me values of kappa from some directional data where I don't know either kappa or mu.
>
>
> ## Generate and fit a "small-mix" data set a la Banerjee et al.
> mu <- rbind(c(-0.251, -0.968),
>             c(0.399, 0.917))
> kappa <- c(4, 4)
>
> theta <- kappa * mu
> theta
> alpha <- c(0.48, 0.52)
>
> ## Generate a sample of size n = 50 from the von Mises-Fisher mixture
> ## with the above parameters.
> set.seed(123)
> x <- rmovMF(50, theta, alpha)
> ## Fit a von Mises-Fisher mixture with the "right" number of components,
> ## using 10 EM runs.
> y2 <- movMF(x, 2, nruns = 10)
>
> Y2 gives
>> y2
> theta:
>        [,1]      [,2]
> 1  2.443225  5.259337
> 2 -1.851384 -4.291278
> alpha:
> [1] 0.4823648 0.5176352
> L:
> [1] 24.98124
>
> How could I calculate kappa and mu if I didn't know either in the 1st place?
>
> Thanks
> Peter
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Loading...