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
227 228 229 230 231 232 233 234 235 236 | |
CustomBinningCalculator
Bases: BaseCalculator
Apply user-supplied bin edges to selected columns.
Source code in skyulf-core/skyulf/preprocessing/bucketing.py
430 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 | |
GeneralBinningCalculator
Bases: BaseCalculator
Master calculator that handles mixed strategies and per-column overrides.
Source code in skyulf-core/skyulf/preprocessing/bucketing.py
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | |
KBinsDiscretizerCalculator
Bases: GeneralBinningCalculator
Thin wrapper around :class:GeneralBinningCalculator with kbins strategy.
Source code in skyulf-core/skyulf/preprocessing/bucketing.py
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | |