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
from process import * | |
import pandas as pd | |
import glob | |
import numpy as np | |
from keras.models import Sequential | |
from keras.layers import Conv2D, Flatten, MaxPool2D, Dense, Dropout | |
from random import shuffle |
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
'''Neural style transfer with Keras. | |
Run the script with: | |
``` | |
python neural_style_transfer.py path_to_your_base_image.jpg path_to_your_reference.jpg prefix_for_results | |
``` | |
e.g.: | |
``` | |
python neural_style_transfer.py img/tuebingen.jpg img/starry_night.jpg results/my_result | |
``` | |
Optional parameters: |
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
from sklearn.datasets import * | |
from sklearn import tree | |
import graphviz | |
wine = load_wine() | |
clf = tree.DecisionTreeClassifier() # init the tree | |
clf = clf.fit(wine.data, wine.target) # train the tree | |
# export the learned decision tree | |
dot_data = tree.export_graphviz(clf, out_file=None, | |
feature_names=wine.feature_names, |
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
from sklearn.datasets import * | |
from sklearn import tree | |
from sklearn.metrics import roc_curve, auc | |
from sklearn.model_selection import train_test_split | |
from sklearn.preprocessing import label_binarize | |
n_classes = 3 | |
wine = load_wine() | |
clf = tree.DecisionTreeClassifier() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 = [] |
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 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 |
OlderNewer