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 | |
from pyod.models.knn import KNN | |
from pyod.utils.data import generate_data | |
from sklearn.metrics import confusion_matrix, balanced_accuracy_score, roc_curve | |
X_train, X_test, y_train, y_test = generate_data( | |
n_train=400, | |
n_test=100, | |
n_features=2, |
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 sys import argv | |
from operator import mul | |
from functools import reduce | |
import numpy as np | |
from scipy import datasets | |
from decord import VideoReader | |
import matplotlib.pyplot as plt | |
from scipy.fft import dctn,idctn |
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 functools import partial | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def signal_param(f,phase,t): | |
return 2*np.pi*f*t+phase | |
def get_secondary_diags(X): | |
return [ |
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 functools import partial | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn.linear_model import Lasso | |
from statsmodels.tsa.arima.model import ARIMA | |
def signal_param(f,phase,t): | |
return 2*np.pi*f*t+phase |
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 functools import partial | |
from itertools import product | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from statsmodels.tsa.arima.model import ARIMA | |
def signal_param(f,phase,t): | |
return 2*np.pi*f*t+phase |
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 functools import partial | |
from itertools import product | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def signal_param(f,phase,t): | |
return 2*np.pi*f*t+phase | |
def calculate_x_AR(P,M,time_series): |
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 | |
SIZE = 64 | |
signal1 = np.fromfunction( | |
lambda i,j: np.sin(2*i+3*j), | |
(SIZE,SIZE) | |
) |
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 | |
N = 100 | |
x = np.random.rand(N) | |
x2 = np.convolve(x,x,mode="same")/N | |
x3 = np.convolve(x2,x,mode="same")/N | |
x4 = np.convolve(x3,x,mode="same")/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 random | |
from operator import sub | |
from datetime import datetime | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
data = pd.read_csv("Train.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 os | |
import time | |
import math | |
import json | |
from functools import partial | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def signal_param(f,phase,t): |
NewerOlder