Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abstractrawdataset updated #202

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions hydragnn/utils/abstractrawdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ def __init__(self, config, dist=False, sampling=None):
"""

# self.serial_data_name_list = []
self.normalize_features = (
config["Dataset"]["normalize_features"]
if config["Dataset"]["normalize_features"] is not None
else False
)
self.node_feature_name = (
config["Dataset"]["node_features"]["name"]
if config["Dataset"]["node_features"]["name"] is not None
Expand Down Expand Up @@ -205,7 +210,8 @@ def __load_raw_data(self):
# scaled features by number of nodes
self.__scale_features_by_num_nodes()

self.__normalize_dataset()
if self.normalize_features:
self.__normalize_dataset()

def __normalize_dataset(self):

Expand Down Expand Up @@ -393,17 +399,6 @@ def __build_edge(self):
self.edge_feature_transform(data) for data in self.dataset
]

for data in self.dataset:
update_predicted_values(
self.variables_type,
self.output_index,
self.graph_feature_dim,
self.node_feature_dim,
data,
)

update_atom_features(self.input_node_features, data)

if "subsample_percentage" in self.variables.keys():
self.subsample_percentage = self.variables["subsample_percentage"]
sampled = stratified_sampling(
Expand Down
Loading