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
0
votes
1 answer

Tensorflow multinomial distribution with eager execution

I am coming from this tutorial, which uses a multinomial distribution in eager execution to get a final prediction for the next character for text generation, based on a predictions tensor coming from our RNN. # using a multinomial distribution to…
mrk
  • 8,059
  • 3
  • 56
  • 78
0
votes
1 answer

Accuracy on test set does not increase

I am working with an image dataset and, as an opportunity for learning, coding multinomial by scratch. I have tried multiple different batch sizes (50, 100, 200) and learning rates (.001, .05, .1, .5). I still can't seem to get better than 1% so I…
sanjayr
  • 1,679
  • 2
  • 20
  • 41
0
votes
1 answer

Multinomial naive bayes classification problem, normalization required?

Classification using multinomial naive bayes is not working, see the code from sklearn.naive_bayes import MultinomialNB from sklearn.feature_extraction import DictVectorizer import numpy as np # training data data = [ {'house': 100, 'street': 50,…
0
votes
0 answers

Should I use multinomial logistic regression or linear discriminant analysis?

In a classification problem, I cannot use a simple logit model if my data label (aka., dependent variable) has more than two categories. That leaves me with multinomial regression and Linear Discriminant Analysis (LDA) and the likes. Why is it that…
0
votes
1 answer

getting overflow in bash script to compute the multinomial coeffcients

I'm using bash to compute the multinomial coefficients. The code follows bellow: #!/bin/bash function factorial { declare n=$1 (( n < 2 )) && echo 1 && return echo $(( n * $(factorial $((n-1))) )) } function binomial { declare n=$1 …
LEo
  • 477
  • 5
  • 14
0
votes
0 answers

Age-transition rate R

data=data.frame("id"=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4), "grade"=c(11,11,12,13,11,12,12,11,13,14,NA,NA,12,11,13,14), "age"=c(20,21,22,23,26,27,28,29,19,20,NA,NA,22,23,24,25)) We have data on when student go from one…
bvowe
  • 3,004
  • 3
  • 16
  • 33
0
votes
2 answers

R. lapply multinomial test to list of dataframes

I have a data frame A, which I split into a list of 100 data frames, each having 3 rows (In my real data each data frame has 500 rows). Here I show A with 2 elements of the list (row1-row3; row4-row6): A <- data.frame(n = c(0, 1, 2, 0, 1, 2), …
Lucas
  • 1,139
  • 3
  • 11
  • 23
0
votes
1 answer

Runing into error while predicting the model bulid in cv.glm on unbalanced test and training data

I have a model predicted using logistic regression using cv.glm on a training dataset and when I predict it on testdata and try to generate a confusion matrix it is throwing error.The classes of both train and testdata set are unbalanced. Here are…
ARJ
  • 2,021
  • 4
  • 27
  • 52
0
votes
1 answer

Use multinomial regression to create a scoring formula

I am trying to build a scoring model using a multinomial regression. Some of this data is from a database, while the target value unconditional is from an assessment and has 3 potential modalities. I tried both multinomial and ordered logistic…
user3148607
  • 191
  • 11
0
votes
1 answer

Standardized mean difference in R

I have got a data frame like the following: region group mid_pop 1 2 1146 2 4 1682 3 3 2891 4 1 7654 5…
Eshmel
  • 49
  • 2
  • 9
0
votes
0 answers

Re-edited: problem in shaping unbalance panel data to run mixed multinomial regression

I have followed 'mlogit' paper to prepare my unbalance panel data for multinomial (panel) regresssion, but I failed to run the regression. After reading some posts, I beleive I have found a good structure for the data, which is similar to this one.…
0
votes
1 answer

R - Sampling Two Correlated Variables

I have two multinomial variables (e.g. age group and color). ageGroup <- c(35,40,45,50) color <- c("Red", "Blue", "Yellow") I want to be able to draw these two variables for 100 observations with equal probability. n = 100 age <-…
kquach
  • 161
  • 1
  • 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
0
votes
1 answer

Multinomial Simulation

I am currently running a multinomial simulation 100 times in R with outcomes 2,3,4,5 each with a certain probability. My objective is to draw 120 times with each draw resulting in only one of the aforementioned outcomes. Finally, I sum the results…
0
votes
1 answer

How can i increase MultinomialNB()'s accuracy score using sklearn and visualize the result in graph using matplotlib?

I'm working on a data-set that looks like this : In my attached screenshot you can see my data-set contains 16 rows and 12 tuples but actually it is containing 521 rows and 12 tuples. 1st column is : "Menarche start early" 2nd column : "Oral…