Created
May 9, 2018 21:03
-
-
Save coreyauger/cb09b13f4915ea4eeadb74a60f51c3c1 to your computer and use it in GitHub Desktop.
Visualise label distribution
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
import numpy as np | |
import os | |
import dtdata as dt | |
from sklearn.neighbors import NearestNeighbors | |
from sklearn.decomposition import PCA | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
sns.set(color_codes=True) | |
plt.rcParams['interactive'] == True | |
# fix random seed for reproducibility | |
np.random.seed(90210) | |
subset = -1 | |
path =r'/home/suroot/Documents/train/daytrader/ema-crossover' # path to data | |
data = dt.loadData(path, subset) | |
(data, labels) = dt.centerAroundEntry(data) | |
print("min: " + str(labels.min()) ) | |
print("max: " + str(labels.max()) ) | |
sns.distplot(labels) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment