I am using Python. I have read in this dataset:
I need to randomly assigned 0 and 1 values such that:
- for a score between 100 and 109: the count of 0's is 2 and the count of 1's is 4
- for a score above 109: the count of 0's is 2 and the count of 1's is 2
So, ultimately, the dataset might look like this:
Again, the Target values (0,1) are randomly assigned but their total count has to sum up to the pre-determined counts: there have to be TWO zero's and FOUR ones when the score is <= 109 an there have to be TWO zero's and TWO one's when the score is greater than 109.
I have tried to combine two arrays (for example: np.concatenate((np.zeros(10), np.ones(23))), but I don't know how to structure it.
Can anyone help, please?
Aucun commentaire:
Enregistrer un commentaire