Skip to content

Instantly share code, notes, and snippets.

View genomexyz's full-sized avatar

Muhammad Ryan genomexyz

View GitHub Profile
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
ranx = np.arange(0, 1500)
rany = np.random.rand(1500)
ranx_label = [''] * len(ranx)
ranx_label[0] = 'labelx awal'
import torch
import argparse
import torch.optim as optim
import torch.nn.functional as F
import sys
import random
import pandas as pd
import numpy as np
sys.path.append(".")
from utils import *
import torch
import argparse
import torch.optim as optim
import torch.nn.functional as F
import sys
import random
import pandas as pd
import numpy as np
sys.path.append(".")
from utils import *
import numpy as np
from sklearn.linear_model import LinearRegression, Ridge, Lasso, LassoLars, BayesianRidge
from sklearn.svm import SVR
from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor, AdaBoostRegressor
from sklearn.metrics import mean_absolute_error
#setting
param_filename = 'all_param.npy'
label_filename = 'all_label.npy'
testing_data_num = 600
import numpy as np
#setting
seq_len = 5
index_missing = 2 #python index start from 0, remember
data_jan = np.load('timeseries_metar_windspeed_WADL-2020-1.npy')
data_feb = np.load('timeseries_metar_windspeed_WADL-2020-2.npy')
data_mar = np.load('timeseries_metar_windspeed_WADL-2020-3.npy')
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
data_jan = np.load('timeseries_metar_windspeed_WADL-2020-1.npy')
data_feb = np.load('timeseries_metar_windspeed_WADL-2020-2.npy')
data_mar = np.load('timeseries_metar_windspeed_WADL-2020-3.npy')
alldata = np.hstack((data_jan, data_feb))
alldata = np.hstack((alldata, data_mar))
import pycurl
import sys
import numpy as np
from datetime import datetime, timedelta
#setting
wilayah = 'WADL'
tahun = '2019'
bulan = '10'
timestep = 30
testing_data_num = 96
all_param = np.load(param_filename)[:3400]
all_label = np.load(label_filename)[:3400]
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
#setting
testing_data_num = 10000
epochs = 1000
batch_size = 100
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from sklearn.metrics import mean_squared_error
#setting
testing_data_num = 10000
epochs = 1000