Skip to content

Commit

Permalink
General improvements.
Browse files Browse the repository at this point in the history
- Fixed Gaussian class for `inference` purpose.
- Changed header.
  • Loading branch information
muammar committed Oct 1, 2019
1 parent 6b98ffa commit 6cea85d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
5 changes: 1 addition & 4 deletions ml4chem/data/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def fit(self, stacked_features, scheduler):
Scaled features using requested preprocessor.
"""

logger.info("Scaling features...")
logger.info("Calling feature scaler...")
if isinstance(stacked_features, np.ndarray):
# The Normalizer() is not supported by dask_ml.
self.preprocessor.fit(stacked_features)
Expand All @@ -140,9 +140,6 @@ def fit(self, stacked_features, scheduler):
stacked_features.compute(scheduler=scheduler)
)

logger.info("Finished scaling features.")
logger.info("")

return scaled_features

def transform(self, raw_features):
Expand Down
2 changes: 1 addition & 1 deletion ml4chem/fingerprints/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def calculate_features(self, images=None, purpose="training", data=None, svm=Fal
symbol = symbol.encode("utf-8")
else:
scaled = torch.tensor(
scaled_feature_space[index],
scaled_feature_space[index].compute(),
requires_grad=False,
dtype=torch.float,
)
Expand Down
14 changes: 7 additions & 7 deletions ml4chem/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@ def get_number_of_parameters(model):
def get_header_message():
"""Function that returns ML4Chem header"""

header = """
header = r"""
===============================================================================
███╗ ███╗██╗██╗ ██╗ ██████╗██╗ ██╗███████╗███╗ ███╗
████╗ ████║██║██║ ██║██╔════╝██║ ██║██╔════╝████╗ ████║
██╔████╔██║██║███████║██║ ███████║█████╗ ██╔████╔██║
██║╚██╔╝██║██║╚════██║██║ ██╔══██║██╔══╝ ██║╚██╔╝██║
██║ ╚═╝ ██║███████╗██║╚██████╗██║ ██║███████╗██║ ╚═╝ ██║
╚═╝ ╚═╝╚══════╝╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝\n
_ ___ _
| | / | | |
_ __ ___ | |/ /| | ___| |__ ___ _ __ ___
| '_ ` _ \| / /_| |/ __| '_ \ / _ \ '_ ` _ \
| | | | | | \___ | (__| | | | __/ | | | | |
|_| |_| |_|_| |_/\___|_| |_|\___|_| |_| |_|
ML4Chem is Machine Learning for Chemistry and Materials. This package is
Expand Down

0 comments on commit 6cea85d

Please sign in to comment.