Skip to content

Instantly share code, notes, and snippets.

@shaan-shah
shaan-shah / rf-explanation1.py
Last active August 18, 2020 08:54
This is a gist to demonstrate some code on medium.
def split_vals(a,n):
return a[:n].copy(), a[n:].copy()
def rmse(x,y): return math.sqrt(((x-y)**2).mean())
def print_score(m,X_train,y_train,X_valid,y_valid):
res = [rmse(m.predict(X_train), y_train), rmse(m.predict(X_valid), y_valid),
m.score(X_train, y_train), m.score(X_valid, y_valid)]
if hasattr(m, 'oob_score_'): res.append(m.oob_score_)
print(res)
@shaan-shah
shaan-shah / sound-confusion-matrix.ipynb
Created May 22, 2020 09:21
The confusion matrix for the sound dataset.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shaan-shah
shaan-shah / training2.ipynb
Created May 22, 2020 09:12
The gist for training a neural net on sound spectograms.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shaan-shah
shaan-shah / training1.ipynb
Created May 22, 2020 08:32
The gist for training a neural network to sound image data.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shaan-shah
shaan-shah / Sound -Dataloader.ipynb
Last active May 22, 2020 08:01
The gist for making a dataloader for sound dataset for training.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shaan-shah
shaan-shah / soundpreprocessing.ipynb
Created May 21, 2020 17:27
Notebook for converting sound to graphs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.