-
Notifications
You must be signed in to change notification settings - Fork 6
Description
- Typo like should be liked
item appeal is how easy it is for the item to be like by the population of users.
- Eq 5 description. This should say if item
jis preferred (iis the subject)
is one if the item
iis preferred
- Typo generate should be generating
The code below is for generate a response matrix for Rasch response:
- In the code example for the Rasch model, I don't think I understand the reason for the following lines of code. This might confuse students. Perhaps the following flow will make things more digestible:
Y = Y[np.argsort(Y.mean(axis=1))][:, np.argsort(Y.mean(axis=0))]
We first just plot P (the output of the Rasch model (probability of subject i liking item j) for randomly samples subjects and items.
plt.imshow(P, cmap='coolwarm')
In this plot, we could observe that
- user#4 has a very small appetite, the probability of them liking anything ends up being very small
- user#5 has a very big appetite, the probability of them liking anything ends up being very high
- item#10 is not appetizing. The probability of anyone liking this item is low
- item#0 is very appetizing. The probability of anyone liking this item is high
To simulate a user preference matrix, we sample from the obtained probabilities (assuming that they represent the parameter of a Bernoulli distribution) to obtain binary preference indicators
sampled_choices = (rng.random(size=(N, M)) < P)
plt.imshow(sampled_choices, cmap='coolwarm')
This choice matrix can finally be sorted if necessary.