MCPcopy Create free account
hub / github.com/SINGROUP/dscribe / metric

Function metric

examples/visualization/visualization.py:43–46  ·  view source on GitHub ↗
(values, reference)

Source from the content-addressed store, hash-verified

41# distance is used and the values are scaled between 0 and 1 from least similar
42# to identical with reference.
43def metric(values, reference):
44 dist = np.linalg.norm(values - reference, axis=1)
45 dist_max = np.max(dist)
46 return 1 - (dist / dist_max)
47
48# Create the features and metrics for all atoms in the sample.
49combined_features = descriptor.create(combined)

Callers 1

visualization.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected