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
# A simple Tensorflow 2 layer dense network example | |
import tensorflow as tf | |
from sklearn.gaussian_process import GaussianProcessClassifier | |
import numpy as np | |
from sklearn import datasets | |
from sklearn.preprocessing import MinMaxScaler | |
from sklearn.decomposition import PCA | |
from sklearn.preprocessing import LabelBinarizer | |
import matplotlib.pyplot as plt |
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
# A simple Tensorflow 2 layer dense network example | |
import tensorflow as tf | |
import numpy as np | |
from sklearn import datasets | |
from sklearn.preprocessing import MinMaxScaler | |
from sklearn.decomposition import PCA | |
from sklearn.preprocessing import LabelBinarizer | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D |
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
require(extRemes) | |
# Sometimes R can be a bit tricky... | |
df <- read.csv('crimes_daily.csv') | |
# convert Date field in CSV to R date format | |
df$DATE <- as.Date(df$DATE) | |
# Get months |
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 pandas as pd | |
import matplotlib.pyplot as plt | |
### Data Wrangling code adapted from https://www.kaggle.com/wosaku/eda-of-crime-in-vancouver-2003-2017 | |
# import csv | |
df = pd.read_csv('crime.csv') | |
df.head() |
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 math | |
import requests | |
import json | |
import os | |
from .color_dicts import mpl_color_map, html_color_codes | |
def safe_iter(var): | |
try: |
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 | |
from sompy.sompy import SOMFactory | |
import pandas as pd | |
import glob | |
import os | |
# read in all csvs from folder | |
path = '..\\..\\data\\' | |
all_files = glob.glob(os.path.join(path, "*.csv")) |
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 pandas as pd | |
import nolds | |
from fbm import FBM | |
import matplotlib.pyplot as plt | |
# number of time steps (days) to predict ahead | |
n = 30 | |
# number of FBMs to realize | |
c = 1000 |
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 pandas as pd | |
import matplotlib.pyplot as plt | |
# read in the csv | |
df = pd.read_csv("eth-cad-max.csv") | |
# get the prices col slice from df | |
prices = np.array(df['price']) | |
H = 0.55 |
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 pandas as pd | |
import matplotlib.pyplot as plt | |
# read in the csv | |
df = pd.read_csv("eth-cad-max.csv") | |
# get the prices col slice from df | |
prices = np.array(df['price']) | |
foo = [] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder