← Về thư mục
skills/relsa-severity-assessment/scripts/kde_thresholds.py
- bw_nrd0 · function · L38-L54 — def bw_nrd0(values: np.ndarray) -> float
- ThresholdResult · class · L58-L123 — class ThresholdResult
- zone_edges · method · L69-L71 — def zone_edges(self) -> list[tuple[float, float]]
- zone_names · method · L73-L81 — def zone_names(self) -> list[str]
- assign · method · L83-L93 — def assign(self, values: Iterable[float]) -> list[str]
- describe · method · L95-L107 — def describe(self) -> str
- as_dict · method · L109-L123 — def as_dict(self) -> dict
- density_curve · function · L126-L145 — def density_curve( values: Iterable[float], bandwidth: float | None = None, grid_size: int = DEFAULT_GRID, cut: float = DEFAULT_CUT, ) -> tuple[np.ndarray, np.ndarray, float]
- _zone_counts · function · L148-L153 — def _zone_counts(data: np.ndarray, thresholds: Sequence[float]) -> list[int]
- _prune_thin_zones · function · L156-L181 — def _prune_thin_zones( data: np.ndarray, minima: list[tuple[float, float]], min_zone_fraction: float, ) -> list[tuple[float, float]]
- find_thresholds · function · L184-L237 — def find_thresholds( values: Iterable[float], bandwidth: float | None = None, grid_size: int = DEFAULT_GRID, cut: float = DEFAULT_CUT, n_thresholds: int | None = None, within_data: bool = True, min_zone_fraction: float = 0.02, ) -> ThresholdResult
- plot_thresholds · function · L240-L284 — def plot_thresholds( result: ThresholdResult, values: Iterable[float], path: str | Path, title: str = "RELSA severity zones", ) -> Path
- build_parser · function · L287-L319 — def build_parser() -> argparse.ArgumentParser
- main · function · L322-L365 — def main(argv: Sequence[str] | None = None) -> int