API: preprocessing.bucketing
skyulf.preprocessing.bucketing
Binning / discretization nodes (GeneralBinning, CustomBinning, KBinsDiscretizer).
All Appliers share a single :class:BaseBinningApplier which routes through
:func:apply_dual_engine. Per-engine helpers live at module level so each one
stays at low CCN. Fits are sklearn / pandas-bound (pd.cut, pd.qcut,
KBinsDiscretizer), so they convert via to_pandas once at the top and do
not use :func:fit_dual_engine.
BaseBinningApplier
Bases: BaseApplier
Shared Applier for all binning Calculators.
Expects bin_edges in params: Dict[str, List[float]] mapping column
names to bin edges.
Source code in skyulf-core/skyulf/preprocessing/bucketing.py
270 271 272 273 274 275 276 277 278 279 | |
CustomBinningCalculator
Bases: BaseCalculator
Apply user-supplied bin edges to selected columns.
Source code in skyulf-core/skyulf/preprocessing/bucketing.py
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 | |
GeneralBinningCalculator
Bases: BaseCalculator
Master calculator that handles mixed strategies and per-column overrides.
Source code in skyulf-core/skyulf/preprocessing/bucketing.py
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | |
KBinsDiscretizerCalculator
Bases: GeneralBinningCalculator
Thin wrapper around :class:GeneralBinningCalculator with kbins strategy.
Source code in skyulf-core/skyulf/preprocessing/bucketing.py
516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 | |