Last active
June 17, 2020 16:10
-
-
Save Mehdi-Amine/1590a7b5fbdd0e0493db23a7982ecf4c to your computer and use it in GitHub Desktop.
abridged version of the concatenation of the happiness dataset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def assemble(col1, col2, col3, col4): | |
return np.concatenate((col1, col2, col3, col4), axis=1) | |
csd = assemble(cold[:s], slow[:s], dislike[:s], unhappy) | |
csl = assemble(cold[s:s*2], slow[s:s*2], like[:s], unhappy) | |
cfd = assemble(cold[s*2:s*3], fast[:s], dislike[s:s*2], unhappy) | |
cfl = assemble(cold[s*3:s*4], fast[s:s*2], like[s:s*2], happy) | |
# ... | |
# We repeat the same for hot(hsd, hsl, hfd, hfl) and burning(bsd, bsl, bfd, bfl) tea temperatures | |
# tea internet book | |
tib = np.concatenate((csd, csl, cfd, cfl, hsd, hsl, hfd, hfl, bsd, bsl, bfd, bfl), axis=0) | |
# printing the first 5 rows and the shape of the dataset | |
tib[:5], tib.shape | |
''' | |
Out: | |
(array([[11.236, 12.965, 0. , 0. ], | |
[28.521, 3.448, 0. , 0. ], | |
[21.96 , 17.448, 0. , 0. ], | |
[17.96 , 12.262, 0. , 0. ], | |
[ 4.681, 3.144, 0. , 0. ]]), (6000, 4)) | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment