0

I want to generate multi class classification data in R. Suppose, I want to create 4 classes and $X|Y=y \sim \mathcal{N}(\mu_y,\Sigma_y)$. I know that we will use mvrnorm function in R to create multivariate data. But how do I create classes and write it as a dataset with features and response Y.

Generate classes separately but how? I am stuck.

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
PRITI
  • 1
  • 1
    Some similar posts: https://stats.stackexchange.com/questions/103728/simulating-multinomial-logit-data-with-r, https://stats.stackexchange.com/questions/372008/simulate-generate-data-for-multinomial-logistic-regression, – kjetil b halvorsen Feb 28 '22 at 18:28

0 Answers0