This file contains hidden or 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 scipy import fftpack, signal | |
import scipy | |
import numpy as np | |
from scipy import signal | |
import matplotlib.pyplot as plt | |
x = np.linspace(0, 10, 100) | |
yorg = np.sin(x) | |
y = yorg + np.random.randn(100)*0.5 |
This file contains hidden or 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 scipy import signal | |
import matplotlib.pyplot as plt | |
import sys | |
# 時系列のサンプルデータ作成 | |
f1 = 120 | |
f2 = 150 | |
n = 256 # データ数 |
This file contains hidden or 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 scipy import signal | |
from scipy.signal import butter | |
import pywt | |
import matplotlib.pyplot as plt | |
def high_pass_filter(x, low_cutoff=10, sample_rate=sample_rate): | |
""" | |
From @randxie https://github.com/randxie/Kaggle-VSB-Baseline/blob/master/src/utils/util_signal.py |
This file contains hidden or 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 __future__ import print_function, division | |
import numpy as np | |
from scipy import stats | |
import matplotlib.pyplot as plt | |
import pystan | |
model = """ | |
data { | |
int<lower=1> N; |
This file contains hidden or 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 pystan | |
import matplotlib.pyplot as plt | |
import pickle | |
# Stanモデル | |
model = """ | |
data { | |
int<lower=0> N; // 学習データの数 |
This file contains hidden or 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 matplotlib.pyplot as plt | |
import numpy as np | |
import pandas as pd | |
import torch | |
from sklearn.model_selection import * | |
from sklearn.model_selection import train_test_split | |
from sklearn.utils import shuffle | |
from torch import nn, optim |
This file contains hidden or 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
!pip install -U torchvision | |
!wget http://www.robots.ox.ac.uk/~vgg/data/flowers/102/102flowers.tgz | |
!mkdir oxford-102 | |
!tar -xzvf 102flowers.tgz -C ./oxford-102 | |
import math | |
import numpy as np |
This file contains hidden or 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
!pip install -U torchvision | |
# http://vis-www.cs.umass.edu/lfw/ | |
!wget http://vis-www.cs.umass.edu/lfw/lfw-deepfunneled.tgz | |
!tar -xzvf lfw-deepfunneled.tgz | |
!mkdir ./lfw-deepfunneled/train | |
!mv ./lfw-deepfunneled/[A-W]* ./lfw-deepfunneled/train | |
!mkdir ./lfw-deepfunneled/test | |
!mv ./lfw-deepfunneled/[X-Z]* ./lfw-deepfunneled/test |
This file contains hidden or 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 pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import lightgbm as lgb | |
from sklearn.model_selection import * | |
!wget "https://www.analyticsvidhya.com/wp-content/uploads/2016/02/AirPassengers.csv" | |
This file contains hidden or 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 matplotlib.pyplot as plt | |
import pandas as pd | |
from keras.models import Sequential | |
from keras.layers import * | |
from keras.layers.recurrent import SimpleRNN | |
from keras.optimizers import * | |
from keras.callbacks import * |