API: modeling.classification
skyulf.modeling.classification
Classification models.
AdaBoostClassifierApplier
Bases: SklearnApplier
AdaBoost Classifier Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
582 583 | |
AdaBoostClassifierCalculator
Bases: SklearnCalculator
AdaBoost Classifier Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | |
__init__()
Bind AdaBoostClassifier with 50 weak learners at rate 1.0.
Both are sklearn's defaults. No base estimator is pinned here, so
fit's config may supply one; sklearn's depth-1 decision stump is
used when it does not.
Source code in skyulf-core/skyulf/modeling/classification.py
599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | |
CalibratedClassifierApplier
Bases: SklearnApplier
Calibrated Classifier Applier (well-calibrated predict_proba).
Source code in skyulf-core/skyulf/modeling/classification.py
268 269 | |
CalibratedClassifierCalculator
Bases: SklearnCalculator
Calibrated Classifier Calculator with a selectable base estimator.
The frontend sends base_estimator as a string key (e.g.
"random_forest"); it is resolved here into a fresh estimator instance
before CalibratedClassifierCV is constructed. Defaults to logistic
regression for backward compatibility. random_state seeds supported
base estimators, defaults to 42, and accepts None for unseeded fits.
It does not shuffle calibration CV folds or affect deterministic bases.
A tuning search space can select one or more base_estimator keys;
each candidate and the final refit use the selected classifier family.
Source code in skyulf-core/skyulf/modeling/classification.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | |
default_params
property
Return the defaults with any tuning-selected base estimator resolved in.
An unrecognized base_estimator key warns and falls back to logistic
regression rather than raising. The factory runs on every access, so
separate tuning trials never share one estimator instance.
__init__()
Bind CalibratedClassifierCV over a logistic-regression base estimator.
Fixes method="sigmoid" and cv=5 alongside that base estimator as
overridable defaults, and starts _tuning_base_config empty so
:attr:default_params yields the bound estimator until
:meth:prepare_tuning_params records a different selection.
Source code in skyulf-core/skyulf/modeling/classification.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | |
fit(X, y, config, progress_callback=None, log_callback=None, validation_data=None, iteration_callback=None, *, sample_weight=None)
Resolve the base estimator in config, then delegate to the base fit.
Source code in skyulf-core/skyulf/modeling/classification.py
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | |
prepare_tuning_params(config)
Absorb base_estimator so it selects an estimator instead of being tuned.
Only keys named in :attr:STRUCTURAL_TUNING_KEYS are taken, read from
either the nested params dict or the flat config.
Source code in skyulf-core/skyulf/modeling/classification.py
338 339 340 341 342 343 344 345 346 | |
DecisionTreeClassifierApplier
Bases: SklearnApplier
Decision Tree Classifier Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
511 512 | |
DecisionTreeClassifierCalculator
Bases: SklearnCalculator
Decision Tree Classifier Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | |
__init__()
Bind DecisionTreeClassifier with sklearn's own unpruned defaults.
max_depth=None grows the tree until its leaves are pure or fall
below min_samples_split=2, so unlike the forest and boosting nodes
in this module this one ships no regularization of its own.
Source code in skyulf-core/skyulf/modeling/classification.py
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | |
ExtraTreesClassifierApplier
Bases: SklearnApplier
Extra Trees Classifier Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
675 676 | |
ExtraTreesClassifierCalculator
Bases: SklearnCalculator
Extra Trees Classifier Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 | |
__init__()
Bind ExtraTreesClassifier with 100 unpruned, non-bootstrapped trees.
bootstrap=False is the distinguishing default: extra-trees randomizes
split thresholds instead of resampling rows, so every tree sees the whole
sample. The remaining settings match sklearn's defaults, and
n_jobs=-1 fits across every core.
Source code in skyulf-core/skyulf/modeling/classification.py
692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 | |
GaussianNBApplier
Bases: SklearnApplier
Gaussian Naive Bayes Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
871 872 | |
GaussianNBCalculator
Bases: SklearnCalculator
Gaussian Naive Bayes Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 | |
__init__()
Bind GaussianNB, whose only knob is var_smoothing=1e-9.
Naive Bayes estimates each feature's variance from the training data, so
there is little to configure up front. var_smoothing is sklearn's own
default: the portion of the largest variance of all features added to
every variance for numerical stability.
Source code in skyulf-core/skyulf/modeling/classification.py
888 889 890 891 892 893 894 895 896 897 898 899 900 | |
GradientBoostingClassifierApplier
Bases: SklearnApplier
Gradient Boosting Classifier Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
547 548 | |
GradientBoostingClassifierCalculator
Bases: SklearnCalculator
Gradient Boosting Classifier Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | |
__init__()
Bind GradientBoostingClassifier with 100 depth-3 trees at rate 0.1.
All three are exactly sklearn's own defaults, restated so the node's
tunable surface is explicit; fit's config overrides any of them.
Source code in skyulf-core/skyulf/modeling/classification.py
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | |
HistGradientBoostingClassifierApplier
Bases: SklearnApplier
HistGradientBoosting Classifier Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
716 717 | |
HistGradientBoostingClassifierCalculator
Bases: SklearnCalculator
HistGradientBoosting Classifier Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 | |
__init__()
Bind HistGradientBoostingClassifier with sklearn's own defaults.
Tree shape is governed leaf-wise — max_leaf_nodes=31 with
max_depth=None — because this estimator bins features into
max_bins=255 buckets and grows by best leaf rather than level by
level. That is the opposite of the level-wise boosting nodes elsewhere
in this module.
Source code in skyulf-core/skyulf/modeling/classification.py
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 | |
KNeighborsClassifierApplier
Bases: SklearnApplier
K-Neighbors Classifier Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
474 475 | |
KNeighborsClassifierCalculator
Bases: SklearnCalculator
K-Neighbors Classifier Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
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 | |
__init__()
Bind KNeighborsClassifier with an unweighted 5-neighbour vote.
algorithm="auto" leaves sklearn to pick the neighbour-search
structure from the data's shape and size, and n_jobs=-1 parallelizes
the queries.
Source code in skyulf-core/skyulf/modeling/classification.py
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | |
LGBMClassifierApplier
Bases: SklearnApplier
LightGBM Classifier Applier.
LightGBM 4.x sets feature_names_in_ to auto-generated names
(Column_0, Column_1...) even when fit with numpy arrays, and the
property's deleter is intentionally a no-op (see upstream source). That
triggers sklearn's UserWarning: X does not have valid feature names
on every predict call. We suppress it locally here so the warning never
leaks out of the applier boundary.
Source code in skyulf-core/skyulf/modeling/classification.py
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 | |
predict(df, model_artifact)
Delegate to the base predict with the feature-name warning suppressed.
Source code in skyulf-core/skyulf/modeling/classification.py
778 779 780 781 782 | |
predict_proba(df, model_artifact)
Delegate to the base predict_proba with the same warning suppressed.
Source code in skyulf-core/skyulf/modeling/classification.py
784 785 786 787 788 | |
LGBMClassifierCalculator
Bases: SklearnCalculator
LightGBM Classifier Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 | |
__init__()
Bind LGBMClassifier with an unregularized leaf-wise configuration.
max_depth=-1 leaves depth unbounded, so num_leaves=31 alone
governs tree shape, and both subsampling rates and both L1/L2
penalties start at their neutral values. Automatic subsample_freq
enables per-round bagging when the fraction is below one, except
for GOSS, which keeps its gradient sampling. verbose and
verbosity are pinned to -1 to quiet LightGBM's native logging
alongside the no-op logger registered at import time.
Source code in skyulf-core/skyulf/modeling/classification.py
803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 | |
fit(X, y, config, progress_callback=None, log_callback=None, validation_data=None, iteration_callback=None, *, sample_weight=None)
Delegate to the base fit with the feature-name warning suppressed.
Source code in skyulf-core/skyulf/modeling/classification.py
835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 | |
LogisticRegressionApplier
Bases: SklearnApplier
Logistic Regression Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
66 67 | |
LogisticRegressionCalculator
Bases: SklearnCalculator
Logistic Regression Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |
__init__()
Bind LogisticRegression with max_iter=1000 and solver="lbfgs".
Both are defaults, not fixtures: fit's config may override either,
and the resulting pair is then checked against _SOLVER_PENALTIES.
Source code in skyulf-core/skyulf/modeling/classification.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
fit(X, y, config, progress_callback=None, log_callback=None, validation_data=None, iteration_callback=None, *, sample_weight=None)
Reject an unsupported solver/penalty pair, then delegate to the base fit.
Source code in skyulf-core/skyulf/modeling/classification.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
RandomForestClassifierApplier
Bases: SklearnApplier
Random Forest Classifier Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
396 397 | |
RandomForestClassifierCalculator
Bases: SklearnCalculator
Random Forest Classifier Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | |
__init__()
Bind RandomForestClassifier with 50 shallow, constrained trees.
max_depth=10, min_samples_split=5 and min_samples_leaf=2
restrict tree growth that sklearn leaves open by default, and the forest
is half sklearn's default size. n_jobs=-1 fits across every core.
All are overridable from fit's config.
Source code in skyulf-core/skyulf/modeling/classification.py
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | |
SGDClassifierApplier
Bases: SklearnApplier
Stochastic Gradient Descent Classifier Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
904 905 | |
SGDClassifierCalculator
Bases: SklearnCalculator
SGD Classifier Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 | |
__init__()
Bind SGDClassifier as a logistic-regression approximation.
loss="log_loss" replaces sklearn's default "hinge", and that is
what makes predict_proba available to the applier — a hinge loss
yields a linear SVM with no probability output. l1_ratio=0.15 stays
inert unless penalty is switched to "elasticnet".
Source code in skyulf-core/skyulf/modeling/classification.py
937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 | |
SVCApplier
Bases: SklearnApplier
SVC Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
435 436 | |
SVCCalculator
Bases: SklearnCalculator
SVC Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
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 | |
__init__()
Bind SVC with an RBF kernel and probability estimates switched on.
probability=True is the load-bearing default — without it the
applier would have no predict_proba to call — and it costs extra
cross-validation at fit time, because Platt scaling is fitted on top of
the margins. C=1.0, kernel="rbf" and gamma="scale" are
sklearn's own defaults.
Source code in skyulf-core/skyulf/modeling/classification.py
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | |
XGBClassifierApplier
Bases: SklearnApplier
XGBoost Classifier Applier.
Source code in skyulf-core/skyulf/modeling/classification.py
619 620 | |
XGBClassifierCalculator
Bases: SklearnCalculator
XGBoost Classifier Calculator.
Source code in skyulf-core/skyulf/modeling/classification.py
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 | |
__init__()
Bind XGBClassifier with XGBoost's defaults plus row/column subsampling.
n_estimators=100, max_depth=6 and learning_rate=0.3 are
XGBoost's own. subsample and colsample_bytree are pulled
down from XGBoost's 1.0 to 0.8, and neither appears in the node's
params metadata, so they are only reachable through fit's
config.
Source code in skyulf-core/skyulf/modeling/classification.py
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 | |