MCPcopy
hub / github.com/snap-stanford/GraphGym / classification_multi

Method classification_multi

graphgym/logger.py:114–119  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

112 }
113
114 def classification_multi(self):
115 from sklearn.metrics import accuracy_score
116
117 true, pred_score = torch.cat(self._true), torch.cat(self._pred)
118 pred_int = self._get_pred_int(pred_score)
119 return {'accuracy': round(accuracy_score(true, pred_int), cfg.round)}
120
121 def regression(self):
122 from sklearn.metrics import mean_absolute_error, mean_squared_error

Callers 1

write_epochMethod · 0.95

Calls 1

_get_pred_intMethod · 0.95

Tested by

no test coverage detected