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

Function _feature_names

python/openquant/feature_diagnostics.py:40–48  ·  view source on GitHub ↗
(n_features: int, feature_names: Sequence[str] | None)

Source from the content-addressed store, hash-verified

38 return rows
39
40
41def _as_vector(y: Sequence[float], n_rows: int) -> list[float]:
42 message = "y must contain finite binary labels (0 or 1)"
43 out = []
44 for value in y:
45 if type(value) is float or type(value) is int:
46 if value not in (0, 1):
47 raise ValueError(message)
48 out.append(float(value))
49 continue
50 if (
51 isinstance(value, (complex, np.complexfloating))

Callers 5

mdi_importanceFunction · 0.85
mda_importanceFunction · 0.85
sfi_importanceFunction · 0.85
feature_screen_reportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected