Questions tagged [dirichlet]

The Dirichlet distribution is a family of continuous multivariate probability distributions.

The Dirichlet distribution is a family of continuous multivariate probability distributions. It is the multivariate generalization of the beta distribution. Dirichlet distributions are very often used as prior distributions in Bayesian statistics, and in fact the Dirichlet distribution is the conjugate prior of the categorical distribution and multinomial distribution.

93 questions
0
votes
1 answer

Random portfolio simulation using dirichlet distribution with weight boundaries

I'm currently stuck at a problem which is on random portfolio simulation, however I'm struggling to generate these portfolios that fit into a certain constraints: the code I have is below: import numpy as np from scipy import stats # n is number…
Dazz W
  • 113
  • 8
0
votes
1 answer

R: Error in set (x, j=name, value=value): supplied x items to be assigned to x items of column "y"

I have a dataframe (df, see below for the head of the df) that includes the proportions of predicted behaviour using four different models. Total number of individuals: 12 Total number of days: 6 Total number of models: 4 Total number of…
0
votes
0 answers

DirichletReg predict 'contrasts can be applied only to factors with 2 or more levels'

I have run a Dirichlet regression model using the DirichletReg package in R. It works perfectly. All variables are continuous apart from the ones with factor(). Dirichlet <- DirichReg(Y ~ DD_GS + pGS + Frst_dy + pp_grwt +…
Charlotte
  • 15
  • 6
0
votes
0 answers

GSL Dirichlet Distribution in C++

I am trying since quite some time to draw random variates from the gsl dirichlet distribution, but I cannot seem to make it work. I have looked around for documentation/examples, but cannot find anything. Does anybody have any…
0
votes
1 answer

Hierarchical Dirichlet regression (jags)... overfitting

Good Morning, please I need community help in order to understand some problems that occurred writing this model. I aim at modeling causes of death proportion using as predictors "log_GDP" (Gross domestic product in log scale), and "log_h" …
Andrea Ni
  • 11
  • 2
0
votes
1 answer

Efficient Generation of Random Orthogonal Matrix in Python

I need to generate a lot of random mean-invariant orthogonal matrices for my work. A mean-invariant matrix has the property A*1_n=1_n, where 1_n is a vector of size n of the scalar 1, basicaly np.ones(n). I use Python and specifically Numpy to…
0
votes
1 answer

What does the error 'invalid class “DMNGroup” object' mean, how to resolve the problem?

I am trying to replicate the workflow from library(DirichletMultinomial). I have large matrix containing counts count and vector of factors pheno. I made a subset of count into countp based on pheno (division into groups) as in the example in…
mschmidt
  • 89
  • 7
0
votes
1 answer

Random intercepts in hierarchical Dirichlet regression (jags)

I have the following data structure: y: 3 columns that are observed proportions of deaths over the years. x1: GDP - continuous variable related to each year x2: Ages- related to deaths Here the model specification: Model Here simulated…
Andrea Ni
  • 11
  • 2
0
votes
0 answers

Why are "mixture" and "predict" giving different results in the DirichletMultinomial R package

I have been using the DirichletMultinomial R package to build some clustering of a dataset. Now, using the model I built, I would like to predict these groups on another dataset. Before doing that, I just used predict on my original dataset and I…
Aurélie
  • 75
  • 2
  • 7
0
votes
1 answer

2D Heat equation -adding initial condition and checking if Dirichlet boundary conditions are right

I am still fairly new to using the numpy and sympy library. Apologies if I have quite a few prints on there, I just wanted to check if the code was working. I am trying to solve this 2D heat equation problem, and kind of struggling on understanding…
Kaori21
  • 43
  • 11
0
votes
1 answer

How can i extend Lucene with a language model?

Good evening everyone! So, i have as project "extend lucene with a language model", i tried adding 2, 3 lines to my code like this: on search.java LMDirichletSimilarity similarity = new LMDirichletSimilarity(2000f); …
Celia A
  • 1
  • 1
0
votes
1 answer

Dirichlet parameters don't update in JAGS

I am trying to run a hierarchical Dirichlet model in JAGS but I have no update and must do something wrong. I try to approximate it with the gamma distribution: #Creating some…
0
votes
2 answers

test for in-tile for Dirichlet tile, using R

So I can take points and use the R libraries deldir or spatstat::dirichlet to find the dirichlet tesselation of those points. Now I have a point not in the set, and I want to know the indices of the points forming the dirichlet tile which my…
EngrStudent
  • 1,924
  • 31
  • 46
0
votes
2 answers

Using online LDA to predict on test data

I am using online LDA to perform some topic modeling task. I am using the core code based on the paper Original Online LDA paper: Hoffman, Blei and Bach, "Online Learning for Latent Dirichlet Allocation." NIPS, 2010. and the code is available at :…
Vishnu
  • 110
  • 2
  • 10
0
votes
0 answers

Dirichlet Multinomial model in JAGS with categorical X

Can someone help with JAGS code for a Bayesian multinomial logistic model with one categorical X variable (Dirichlet prior)? My representative sample is the matrix "z" in the code below that represents the 3 outcomes and "site", in the bottom line…
user40950
  • 1
  • 3