Doubt in Data preparation code in LOGISTIC R

Hi Sir/Ma’am

Sir my doubt is how this part of code work.

Sir said that for multivariate_normal we have to pass the mean and covariance matrix.

So how mean goes in this, like what mean_01=np.array[1,0.5] does it simply creates an array .

So please elaborate this code as to how we create a mean and what the covariance does .

Thanks & Regards

hey @Royal_Yashasvi ,
initially to create a sample data (artificial ) we need to provide the mean and covariance values for that data to be generated.
You can understand it in this way that , generally what happen is we have data , then we can calculate mean and covariance of it , but here we are going in reverse.
Hence , we randomly create two such pairs of mean values and covariances , and create sample data using multivariate_normal

Its actually a type of distribution , you can understand more about it in deep on google.

yes , that’s simple array containing the mean values of data to be created further.

These are just random values choosen . You can try anything.

Covariance explains a relationship of how a distribution is going to be based on other distribution.

I hope this helps.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.