MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / summarize_binary

Function summarize_binary

mbench/motion_generalizability.py:16–22  ·  view source on GitHub ↗

Return mean/std/count summary for binary values.

(values: List[float])

Source from the content-addressed store, hash-verified

14
15
16def summarize_binary(values: List[float]) -> Dict[str, float]:
17 """Return mean/std/count summary for binary values."""
18 if not values:
19 return {"mean": 0.0, "std": 0.0, "num_samples": 0}
20 arr = np.asarray(values, dtype=np.float32)
21 std = float(arr.std()) if arr.size > 1 else 0.0
22 return {"mean": float(arr.mean()), "std": std, "num_samples": int(arr.size)}
23
24
25def compute_motion_generalizability(full_info_path: str, device: str,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected