Autoregressive test score calculated on 96 values

This commit is contained in:
Victor Mylle
2023-11-13 23:14:07 +00:00
parent caeba6b841
commit 75f1f64c38
4 changed files with 45 additions and 13 deletions

View File

@@ -31,7 +31,7 @@ class NrvDataset(Dataset):
return skip_indices
def __len__(self):
return len(self.nrv) - self.sequence_length - self.predict_sequence_length - len(self.samples_to_skip)
return len(self.valid_indices)
def __getitem__(self, idx):
actual_idx = self.valid_indices[idx]
@@ -63,7 +63,6 @@ class NrvDataset(Dataset):
print(f"Found nan values in the features of sample {idx}.")
print(f"Actual index: {actual_idx}")
raise ValueError("There are nan values in the features.")
return all_features, nrv_target

View File

@@ -66,15 +66,6 @@ class DataProcessor:
df = df[['datetime', 'load_forecast', 'total_load']]
df['datetime'] = pd.to_datetime(df['datetime'], utc=True)
# check if there are nan values
if df.isnull().values.any():
# print the rows with nan values
# print(df[df.isnull().any(axis=1)])
# export to temp csv
df[df.isnull().any(axis=1)].to_csv("temp.csv")
# raise ValueError("There are nan values in the load forecast data.")
df.sort_values(by="datetime", inplace=True)
return df