MCPcopy Create free account
hub / github.com/Open-Quant/openquant / _as_vector

Function _as_vector

python/openquant/feature_diagnostics.py:33–37  ·  view source on GitHub ↗
(y: Sequence[float], n_rows: int)

Source from the content-addressed store, hash-verified

31
32
33def _as_vector(y: Sequence[float], n_rows: int) -> list[float]:
34 out = [float(v) for v in y]
35 if len(out) != n_rows:
36 raise ValueError(f"y/X length mismatch: {len(out)} vs {n_rows}")
37 return out
38
39
40def _feature_names(n_features: int, feature_names: Sequence[str] | None) -> list[str]:

Callers 4

mdi_importanceFunction · 0.85
mda_importanceFunction · 0.85
sfi_importanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected