Questions tagged [multinomial]

The multinomial distribution provides a probability distribution over three or more possible outcomes. It generalizes the more fundamental binomial distribution (two outcomes).

In probability theory, the multinomial distribution generalizes the binomial distribution to three or more outcomes.

Suppose two chess players had played numerous games, from which we estimate that Player A would win with probability 0.40, Player B would win with probability 0.35, and the probability that the game ends in a draw is 0.25. The multinomial distribution can be used to answer questions like:

  1. If these two chess players played 12 games, what is the expected number of wins, losses, and draws for player A?
  2. If these two chess players play 3 games, what is the probability that A wins one, B, wins one, and they draw on the other?

Binary classification/prediction methods (such as logistic regression) can also be generalized for multinomial outcomes (i.e., three or more class labels). Multinomial logistic regression is also sometimes called a maximum entropy (MaxEnt) model.

421 questions
2
votes
0 answers

Multinomial Distribution in python

I am trying to translate some Julia code to Python. This is code for the multinomial distribution, and I am stuck in the last part of the it. I don't know how to write it in Python, because I want to know if there is a package that will do what I…
M.HANHASSE
  • 129
  • 1
  • 6
2
votes
1 answer

How to get marginal effects for categorical variables in mlogit?

I want to compute marginal effects for a "mlogit" object where explanatory variables is categorical (factors). While with numerical data effects() throws something, with categorical data it won't. For simplicity I show a bivariate example…
jay.sf
  • 60,139
  • 8
  • 53
  • 110
2
votes
1 answer

C++ Multinomial distribution

I'm trying to code a multinomial algorithm that will basically apply a binomial distribution to each value of an input vector, knowing the values of all previous ones. It's aimed here to generate a new population for multiple alleles knowing the…
2
votes
1 answer

Reference group in PySpark multinomial regression

Does anyone know what the default reference group is in a Pyspark multinomial logistic regression. For instance, we have multiclass outcomes/target of A, B, C, and D. How does spark choose the reference category? In standard logistic regression in…
2
votes
2 answers

Can Matlab handle continous observation for Hidden Markov Model

I am wondering can matlab hmm toolbox handle continuous observation? Can it handle multiple observations variable(feature for each state) It seems that it can handle single stream of discrete observations. Is that correct or am I missing…
2
votes
1 answer

Multinomial coefficient code always delivers the same answer

I have written the following code in order to find the multinomial coefficient, however the same answer, 2.122e-314, always comes out. I've been sitting on this for a while now, and can't find what is missing. We are supposed to do this using…
user9078057
  • 187
  • 1
  • 6
2
votes
1 answer

How to obtain multinomial probabilities in WinBUGS with multiple regression

In WinBUGS, I am specifying a model with a multinomial likelihood function, and I need to make sure that the multinomial probabilities are all between 0 and 1 and sum to 1. Here is the part of the code specifying the likelihood: e[k,i,1:9] ~…
Sprog
  • 75
  • 6
2
votes
1 answer

Summary function extremely slow with nnet's multinom compared to regression function

I'm using the multinom() function in the nnet package. My data has a little over a million rows and 4 independent variables. The multinom() function itself creates a model within ~15 minutes, and I can view coefficients. I need to access them as an…
Nicholas Hassan
  • 949
  • 2
  • 10
  • 27
2
votes
1 answer

Number of solutions for equation with n variables with constraints

I wanted to calculate the number of solutions of the equation, but I am unable to get any lead. The equation is: All I could get is by doing something like, But I don't know how to proceed on this.
Noob Coder
  • 244
  • 2
  • 6
2
votes
0 answers

Multilevel multinomial logistic regression with mlogit (R)

I´m trying to model a multilevel multinomial logistic regression. I have 42 subjects with 82 observations per person. In each observation the suvjects("VP") were able to react in three different ways mldata <- mlogit.data(data1, choice =…
2
votes
0 answers

R multinom (nnet) logistic regression prediction

I am going through "Applied Logistic Regression" by Hosmer, Lemeshow and Sturdivant, concretely chapter 8, multinomial logistic regression. I've built a model: >library(nnet) >library(aplore3); data(aps) >fit <- multinom(place3 ~ danger, data =…
rquest
  • 21
  • 3
2
votes
1 answer

Sample from discrete distribution using weights in Eigen Vector

I have a set of weights in an Eigen::VectorXd and would like to draw samples from the range of indices using these values are probabilities. If weights is a std::vector I can do this: std::random_device rd; std::mt19937…
Flash
  • 15,945
  • 13
  • 70
  • 98
2
votes
1 answer

multinomial/conditional logit with grouped data in R

I'm looking for a way to fit a conditional logit on grouped data in R. I have multinomial choice counts with response- and individual-specific variables. Unfortunately, the expanded dataset would be too huge to work with it. Thus I can't use most of…
Cabana
  • 419
  • 2
  • 7
2
votes
0 answers

Interpretation of coefficients in multinomial LogisticRegressionWithLBFGS model output in scala

I am attempting to do some post processing of the outputs of a multinomial LogisticRegressionWithLBFGS model. The model matrix is created in R and then exported to scala spark for model fitting. The documentation states that there is "standard…
2
votes
1 answer

Generating confidence intervals for predicted probabilities after running mlogit function in R

I have been struggling with the following problem for some time and would be very grateful for any help. I am running a logit model in R using the mlogit function and am able to generate the predicted probability of choosing each alternative for a…
James
  • 35
  • 4