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
1
vote
1 answer

How can I add a title to multiclass.roc plots in pROC?

I have a multinomial model constructed with nnet:multinom of 5 classes for 26 variables: mirna_multinom_0 = multinom(formula_0, data= clase_training, maxit=10000 ) And then I create my ROCS with: multiclass.roc(clase_training$clase,…
Galpaccru
  • 57
  • 12
1
vote
0 answers

Interpreting variable importance for multinomial logistic regression - `nnet::multinom()` and `caret::varImp()`

I am trying to calculate and interpret the variable importance of a multinomial logistic regression I built using the multinom() function from the {nnet} R package. I want to measure the variable importance of each predictor variable contributing to…
cyun
  • 95
  • 1
  • 2
  • 7
1
vote
1 answer

Multinomial classification using glmnet in caret fails

I'm completely new to machine learning. But I'm working on data set and want to perform a three class classification problem and want to compare a few models using caret. When trying to use glmnet I encounter a problem and receive the following…
1
vote
1 answer

LogLikelihood and MultinomialDistribution in mathematica

can someone explain to me why the following code LogLikelihood[ MultinomialDistribution[ countstot, {dt1/ttot, dt2/ttot, dt3/ttot, dt4/ttot, dt5/ttot}], {CR1, CR2, CR3, CR4, CR5}] does not produce a number as output, but instead…
J. Dowe
  • 99
  • 1
  • 5
1
vote
0 answers

R: Pearson's chi-squared test with multinomial logistic regression

I am running a multinomial logistic regression comparable to this: library(nnet) data(mtcars) mod <- multinom(vs ~ cyl + mpg, data = mtcars) summary(mod) I would like to run a pearson's chi-squared test to examine the fit of my model, but I've been…
1
vote
2 answers

Plot coefficients from a multinomial logistic regression model

I have a multinomial logistic regression model built using multinom() function from nnet package in R. I have a 7 class target variable and I want to plot the coefficients that the variables included in the model have for each class of my dependent…
Alan
  • 129
  • 1
  • 13
1
vote
0 answers

What is the best way to sample one word from tens of million words at the last layer of NNs?

I have a huge NNs with tens of million Softmax probabilities at the last layer. For each given x, I need to randomly sample just one of the output nodes according to the probabilities. I use tf.random.multinomial, but its complexity is O(n), where n…
1
vote
1 answer

Reverse engineer multinomial logistic regression data

I am working on a multinomial logistic regression problem (i.e., where I want to classify some unordered, independent levels of a nominal outcome variable). My issue is that I know the levels of the outcome variable (in this example,…
kstew
  • 1,104
  • 6
  • 21
1
vote
3 answers

How to use the fit method with an array of messages

I'm trying to train and test multinomial bayes on a dataset, split accordingly. After processing the data I have an array of messages and an array of labels. I'm trying to use .fit() and .predict() with this data but it isn't working. My data looks…
ice
  • 39
  • 6
1
vote
0 answers

mlogit: multinominal probit model with intercept returns error

I am experiencing a problem fitting a multinominal probit with the package mlogit. I am interested in a model with a single alternative specific covariate with a generic coefficient (more details on notation here). In brief, 2001 respondents are…
1
vote
2 answers

How can I create a random vector using random uniform generator for multinomial dist

How can I only use the random uniform generator to create a multinomial distribution with the following probabilities: ((0.2, 0.1, 0.3, 0.4).
Alex
  • 15
  • 2
1
vote
1 answer

Multinomial test in Python with met module

I am trying to conduct a multinomial test in Python --the analogous in R would be: library(XNomial) xmulti(prfs, c(1/3, 1/3, 1/3), statName="Prob") I am using the met module. However I get an exception. Here is the code: prfs Pref A 8 B …
user8270077
  • 4,621
  • 17
  • 75
  • 140
1
vote
0 answers

Does ChoiceModelR alter the order of cases?

Im using ChoiceModelR to analyse a conjoint designe. Every participants had to answer 12 choice-sets, each consisting of 3 choice-options plus no-choice. 6 Variables described the choice-options. My imput-data for ChoiceModelR looks like this: >…
TinglTanglBob
  • 627
  • 1
  • 4
  • 14
1
vote
0 answers

How does likelihood probability in sklearn multinomialnb calculated?

We can print the class probability and feature probability (likelihood) by using class_log_prior and feature_log_prob_ . When I try to compare my own calculation with MultinomialNB sklearn, the class log prior is match but not with the feature log…
Irfan HP
  • 123
  • 4
1
vote
1 answer

How to find multinomial distribution parameter for a known data using python?

I just start learning Python. Here is a data frame: a=pd.DataFrame({'A1':[0,1,2,3,2,1,6,0,1,1,7,10]}) Now I think this data follows multinomial distribution. So, 12 numbers means the frequency of 12 categories (category 0, 1, 2...). For example,…
Feng Chen
  • 2,139
  • 4
  • 33
  • 62