Skip to content

Instantly share code, notes, and snippets.

View doandongnguyen's full-sized avatar

Doan Dong Nguyen doandongnguyen

  • HUST
  • Vietnam
View GitHub Profile
@GerardBCN
GerardBCN / stock_price_autoencoding.ipynb
Created January 18, 2019 21:15
Stock market Bitcoin data compression with autoencoders
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jkleint
jkleint / timeseries_cnn.py
Created July 29, 2016 04:05
Example of using Keras to implement a 1D convolutional neural network (CNN) for timeseries prediction.
#!/usr/bin/env python
"""
Example of using Keras to implement a 1D convolutional neural network (CNN) for timeseries prediction.
"""
from __future__ import print_function, division
import numpy as np
from keras.layers import Convolution1D, Dense, MaxPooling1D, Flatten
from keras.models import Sequential
@tartakynov
tartakynov / fourex.py
Last active December 20, 2024 08:10
Fourier Extrapolation in Python
import numpy as np
import pylab as pl
from numpy import fft
def fourierExtrapolation(x, n_predict):
n = x.size
n_harm = 10 # number of harmonics in model
t = np.arange(0, n)
p = np.polyfit(t, x, 1) # find linear trend in x
x_notrend = x - p[0] * t # detrended x