Skip to content
Snippets Groups Projects
Commit 6c71e398 authored by Laura Christine Kühle's avatar Laura Christine Kühle
Browse files

Changed order of methods.

parent 3ded44d2
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ TODO: Improve '_generate_cell_data' ...@@ -6,6 +6,7 @@ TODO: Improve '_generate_cell_data'
TODO: Extract normalization (Combine smooth and troubled before normalizing) -> Done TODO: Extract normalization (Combine smooth and troubled before normalizing) -> Done
TODO: Adapt code to generate both normalized and non-normalized data -> Done TODO: Adapt code to generate both normalized and non-normalized data -> Done
TODO: Improve verbose output TODO: Improve verbose output
TODO: Change order of methods -> Done
""" """
...@@ -52,11 +53,6 @@ class TrainingDataGenerator(object): ...@@ -52,11 +53,6 @@ class TrainingDataGenerator(object):
self._save_data(data_dict) self._save_data(data_dict)
return data_dict return data_dict
def _save_data(self, data):
for key in data.keys():
name = self._data_dir + '/' + key + '_data.npy'
np.save(name, data[key])
def _calculate_data_set(self, num_samples): def _calculate_data_set(self, num_samples):
num_smooth_samples = round(num_samples * self._balance) num_smooth_samples = round(num_samples * self._balance)
smooth_input, smooth_output = self._generate_cell_data(num_smooth_samples, smooth_input, smooth_output = self._generate_cell_data(num_smooth_samples,
...@@ -165,6 +161,11 @@ class TrainingDataGenerator(object): ...@@ -165,6 +161,11 @@ class TrainingDataGenerator(object):
normalized_input_data[i] = input_data[i] / max_function_value normalized_input_data[i] = input_data[i] / max_function_value
return normalized_input_data return normalized_input_data
def _save_data(self, data):
for key in data.keys():
name = self._data_dir + '/' + key + '_data.npy'
np.save(name, data[key])
# Get Training/Validation Datasets # Get Training/Validation Datasets
np.random.seed(1234) np.random.seed(1234)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment