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 | |
ranx = np.arange(0, 1500) | |
rany = np.random.rand(1500) | |
ranx_label = [''] * len(ranx) | |
ranx_label[0] = 'labelx awal' |
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 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 * |
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 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 * |
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 | |
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 |
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 | |
#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') |
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 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)) |
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 pycurl | |
import sys | |
import numpy as np | |
from datetime import datetime, timedelta | |
#setting | |
wilayah = 'WADL' | |
tahun = '2019' | |
bulan = '10' | |
timestep = 30 |
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
testing_data_num = 96 | |
all_param = np.load(param_filename)[:3400] | |
all_label = np.load(label_filename)[:3400] |
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 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 |
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 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 |
NewerOlder