Calcuate the the adjusted McFadden's pseudo R-square between the embeddings and the labels

get_r2_mcfadden(embeds, y)

Arguments

embeds

a n-by-q matrix, specify the embedding matrix.

y

a n-length vector, specify the labels.

Value

return the adjusted McFadden's pseudo R-square.

Details

None

References

McFadden, D. (1987). Regression-based specification tests for the multinomial logit model. Journal of econometrics, 34(1-2), 63-82.