Browse Source

Merge pull request #2 from laserscout/float64_error

avoid sklern.scale() error for converting float32 to float64
master
Apostolos Fanakis 6 years ago
committed by GitHub
parent
commit
9cbffa3d2f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      classifier/preprocessing/data_preprocessing.py

4
classifier/preprocessing/data_preprocessing.py

@ -68,7 +68,7 @@ def standardization(dataset):
print(bcolors.YELLOW + 'Running standardization' + bcolors.ENDC)
# Standardization
scaledDataset = preprocessing.scale(dataset)
scaledDataset = preprocessing.scale(np.float64(dataset))
return scaledDataset
@ -95,4 +95,4 @@ if __name__ == "__main__":
print(bcolors.GREEN + 'Saving scaled results to file' + bcolors.ENDC)
datasetFrame = pd.DataFrame(scaledDataset, columns = featureKeys)
datasetFrame = datasetFrame.assign(target=target)
datasetFrame.to_pickle("./dataset.pkl")
datasetFrame.to_pickle("./dataset.pkl")

Loading…
Cancel
Save