fix
parent
550066ee5f
commit
636d3636bb
|
@ -314,8 +314,6 @@ class GasSensorDataLoader:
|
||||||
x_output = np.concatenate((x_output, x_sample))
|
x_output = np.concatenate((x_output, x_sample))
|
||||||
y_output = np.concatenate((y_output, y_sample))
|
y_output = np.concatenate((y_output, y_sample))
|
||||||
|
|
||||||
target_scaler = MinMaxScaler()
|
|
||||||
y_output = target_scaler.fit_transform(y_output)
|
|
||||||
|
|
||||||
self.dataset['xboost'] = (x_output, y_output, g_output)
|
self.dataset['xboost'] = (x_output, y_output, g_output)
|
||||||
|
|
||||||
|
|
|
@ -203,6 +203,8 @@ class eNoseTrainer:
|
||||||
|
|
||||||
node = os.uname()[1]
|
node = os.uname()[1]
|
||||||
X_xboost, Y_xboost, G_xboost = self.loader.load_dataset_xboost()
|
X_xboost, Y_xboost, G_xboost = self.loader.load_dataset_xboost()
|
||||||
|
target_scaler = MinMaxScaler()
|
||||||
|
Y_scaled = target_scaler.fit_transform(Y_xboost)
|
||||||
|
|
||||||
gss = StratifiedGroupKFold(n_splits=int(1/self.ratio), shuffle=True, random_state=get_seed())
|
gss = StratifiedGroupKFold(n_splits=int(1/self.ratio), shuffle=True, random_state=get_seed())
|
||||||
|
|
||||||
|
@ -210,8 +212,8 @@ class eNoseTrainer:
|
||||||
os.makedirs('{}/{}/{}'.format(self.name, self.target, dataset), exist_ok=True)
|
os.makedirs('{}/{}/{}'.format(self.name, self.target, dataset), exist_ok=True)
|
||||||
|
|
||||||
for i, (train_index, test_index) in enumerate(gss.split(X_xboost, Y_xboost, G_xboost)):
|
for i, (train_index, test_index) in enumerate(gss.split(X_xboost, Y_xboost, G_xboost)):
|
||||||
X_train, X_test = X_xboost[train_index], X_xboost[test_index]
|
X_train, X_test = X_xboost[train_index], Y_scaled[test_index]
|
||||||
y_train, y_test = Y_xboost[train_index], Y_xboost[test_index]
|
y_train, y_test = Y_xboost[train_index], Y_scaled[test_index]
|
||||||
|
|
||||||
|
|
||||||
for model in self.get_model_train():
|
for model in self.get_model_train():
|
||||||
|
|
Loading…
Reference in New Issue