[x] Remove the definition of the variable batchSize and filePath at findNormaliser and use instead of it the attribute self.batchSize and self.filePath (so there is no need more to pass parameters to the method). Then call the method findNormaliser, take the results min_val, max_val, and mean_val and set them as global attributes. For example:
[x] Edit the method readAndFilterBatchFromCsv so it dose not take the parameters filePath and batchSize any more and use the global attributes instead. For example self.filePath and self.batchSize.
[x] Edit the method normaliseBatch so it dose not take min_val, max_val, and mean_val anymore and use the global attributes instead.
In this Issue, a normaliser class is created, that can read and normalise batches of a given csv file.
Create a class with the name
Normaliser
with the following constructor:filePath
andbatchSize
for example:[x] Remove the definition of the variable
batchSize
andfilePath
atfindNormaliser
and use instead of it the attributeself.batchSize
andself.filePath
(so there is no need more to pass parameters to the method). Then call the methodfindNormaliser
, take the resultsmin_val
,max_val
, andmean_val
and set them as global attributes. For example:[x] Edit the method
readAndFilterBatchFromCsv
so it dose not take the parametersfilePath
andbatchSize
any more and use the global attributes instead. For exampleself.filePath
andself.batchSize
.[x] Edit the method
normaliseBatch
so it dose not takemin_val
,max_val
, andmean_val
anymore and use the global attributes instead.