Skip to content

Commit

Permalink
Added train and validation set generation audio_preprocessing.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
AnanthVivekanand committed Oct 31, 2020
1 parent 210d9d3 commit 6952e36
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions audio_preprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,25 @@
"np.save('features.npy', features)\n",
"np.save('labels.npy', labels)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"X = (features)\n",
"y = (labels)\n",
"\n",
"# Encode the classification labels\n",
"le = LabelEncoder()\n",
"yy = to_categorical(le.fit_transform(y)) \n",
"\n",
"# split the dataset \n",
"from sklearn.model_selection import train_test_split \n",
"\n",
"x_train, x_test, y_train, y_test = train_test_split(X, yy, test_size=0.2, random_state = 42)"
]
}
],
"metadata": {
Expand Down

0 comments on commit 6952e36

Please sign in to comment.