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
0 answers

Algorithm for generating Multinomial random variables

I would like to generate random numbers from a Multinomial distribution. Say you have n and p_1,...p_m such that sum of p_1, ...,p_m is equal to 1. I know n and p_1,...,p_m values. Ideally, I would like to write a code in Python; but a general…
NNsr
  • 1,023
  • 2
  • 11
  • 25
0
votes
1 answer

Calculating B and |V| in naive bayes text classification

I found a link about multinomial naive bayes classifier multinomial naive bayes link How we could calculate the B' or |V|? The page said that it is the number of terms in the vocabulary. In its example, how we could get 6 for B? Is it the counting…
mhabibi
  • 11
  • 6
0
votes
1 answer

Reshaping the data for a multinomial regression

I am currently learning about the multinomial logit estimator and I want to use it to estimate a model in R with the mlogit package. After reading extensively on the subject, it was clear that an important step in the process is the reshaping of the…
SavedByJESUS
  • 3,262
  • 4
  • 32
  • 47
-1
votes
1 answer

Specifying Reference Category for Outcome Variable in Multinomial Logit Using SKlearn's LogisticRegression

I am trying to fit a multinomial logit model using LogisticRegression module from Sklearn. My outcome (y) has 4 levels. I need to specify one of these levels as the reference category (or baseline). Does the LogisticRegression module provides a way…
-1
votes
1 answer

Multinomial Logistic Regression in Python

I am trying to create multinomial logistic regression, I have never done this. I am trying to follow the tutorial: Multinomial Logistic Regression With Python. I am trying to take the data, and predict gambling (binary) from the alcohol dependence…
-1
votes
1 answer

Suest after AME- dy/dx not saving for suest

After running these command all day, my head is on fire, I am now reaching out. Please don't direct me to papers about Suest that are commonly mentioned on the web, I already checked them. It seems there is a problem with storing the dy/dx values of…
OCR
  • 1
  • 1
-1
votes
1 answer

best regression function for multinomial regression

When using the glm function: which is the best distribution for multinomial regression --- is it "binomial"? If the glm function doesn't have an appropriate distribution for multinomial regression, which r package has a better function? Thank you!
-1
votes
1 answer

P-value in nnet: multinom() . P-value Wald test extracted, but ¿how i extract it by LIkehood ratio?

I got a multinomial model, which goes like this: I got a bunch of observations (patients) that have 1 of 5 classes: Control, A_severe, A_low, B_severe, and B_low. So I tried to fit a multinom model with the package nnet, and I extracted the Wald…
Galpaccru
  • 57
  • 12
-1
votes
1 answer

How to use softmax output in python for neural-network and machine-learning to interpret Multinomial Logit Model?

It involves the use of softmax function output for machine-learning and neural-network to understand and interpret Multinomial Logit Model.
-1
votes
1 answer

"system is computationally singular" error in mlogit R-package

I wanna solve my problem using multinomial logistic regression, mlogit R-package. when I run the below code, ml.data <- mlogit.data(dat, shape = "wide", choice = "Resp") mlogit(Resp ~ A + B+ C+ D, ml.data) I am getting this error: "system is…
user4704857
  • 469
  • 4
  • 18
-1
votes
1 answer

Matlab code for general multinomial formula

I would like to know if there is Matlab code that can solve the multinomial formula. I can write a code for finite number of terms in the multinomial formula, for example, (x_{1}+x_{2}+x_{3})^4. But for general case, I found it is not easy, i.e. …
-2
votes
1 answer

Large Matrix to run in cv.glmnet() for multinomial classification

I am working on a large matrix with number of samples N=40 and features, P=7130. I am trying to fit the cv.glmnet() for the ridge but i am getting error while doing this. The dimensions of the dataset is (40,7130) The code for the cv.glmnet() is as…
botloggy
  • 383
  • 2
  • 15
-2
votes
1 answer

can I set memory size in R?

I'm running this model: library('nnet') test <- multinom(events ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8 + X9 + X10 + X11, data = data) And I got this error: Error: cannot allocate vector of size 313.3 Mb Is there a way to fix this? For example is…
Jenny Shu
  • 47
  • 2
  • 4
  • 12
-3
votes
1 answer

Is Multinomial logistic regression appropriate for this dataset?

I have the following dataset shown below. Any value between 500 & 900 were categorized as A, while values between 900 & ~1500 were mixed between A and B. I want to find the probability of getting A, B, and C at any value of x where x is my…
Fanylion
  • 364
  • 2
  • 5
  • 14
-4
votes
1 answer

How can I turn a word into a float value

For a side project of mine, I am trying to build a Naives Bayes model that can detect if a piece of news is fake based on the headline. Here is my code so far: import numpy as np import pandas as pd import sklearn from sklearn.model_selection…
theguy
  • 49
  • 6
1 2 3
27
28