Skip to content

API: modeling.regression

skyulf.modeling.regression

Regression models.

AdaBoostRegressorApplier

Bases: SklearnApplier

AdaBoost Regressor Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
380
381
class AdaBoostRegressorApplier(SklearnApplier):
    """AdaBoost Regressor Applier."""

AdaBoostRegressorCalculator

Bases: SklearnCalculator

AdaBoost Regressor Calculator.

Source code in skyulf-core/skyulf/modeling/regression.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
@NodeRegistry.register("adaboost_regressor", AdaBoostRegressorApplier)
@node_meta(
    id="adaboost_regressor",
    name="AdaBoost Regressor",
    category="Modeling",
    description="An AdaBoost regressor.",
    params={"n_estimators": 50, "learning_rate": 1.0},
    tags=["regression"],
    learns_from_data=True,
)
class AdaBoostRegressorCalculator(SklearnCalculator):
    """AdaBoost Regressor Calculator."""

    def __init__(self):
        """Bind ``AdaBoostRegressor`` 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; otherwise sklearn falls back to
        ``DecisionTreeRegressor(max_depth=3)`` — a deeper weak learner than
        the ``AdaBoostClassifier`` node's depth-1 stump.
        """
        super().__init__(
            model_class=AdaBoostRegressor,
            default_params={
                "n_estimators": 50,
                "learning_rate": 1.0,
            },
            problem_type="regression",
        )

__init__()

Bind AdaBoostRegressor 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; otherwise sklearn falls back to DecisionTreeRegressor(max_depth=3) — a deeper weak learner than the AdaBoostClassifier node's depth-1 stump.

Source code in skyulf-core/skyulf/modeling/regression.py
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
def __init__(self):
    """Bind ``AdaBoostRegressor`` 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; otherwise sklearn falls back to
    ``DecisionTreeRegressor(max_depth=3)`` — a deeper weak learner than
    the ``AdaBoostClassifier`` node's depth-1 stump.
    """
    super().__init__(
        model_class=AdaBoostRegressor,
        default_params={
            "n_estimators": 50,
            "learning_rate": 1.0,
        },
        problem_type="regression",
    )

DecisionTreeRegressorApplier

Bases: SklearnApplier

Decision Tree Regressor Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
307
308
class DecisionTreeRegressorApplier(SklearnApplier):
    """Decision Tree Regressor Applier."""

DecisionTreeRegressorCalculator

Bases: SklearnCalculator

Decision Tree Regressor Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
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
@NodeRegistry.register("decision_tree_regressor", DecisionTreeRegressorApplier)
@node_meta(
    id="decision_tree_regressor",
    name="Decision Tree Regressor",
    category="Modeling",
    description="A decision tree regressor.",
    params={"max_depth": None, "min_samples_split": 2, "criterion": "squared_error"},
    tags=["regression"],
    learns_from_data=True,
)
class DecisionTreeRegressorCalculator(SklearnCalculator):
    """Decision Tree Regressor Calculator."""

    def __init__(self):
        """Bind ``DecisionTreeRegressor`` 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.
        ``criterion="squared_error"`` is the regression analogue of the
        classifier node's ``gini`` default.
        """
        super().__init__(
            model_class=DecisionTreeRegressor,
            default_params={
                "max_depth": None,
                "min_samples_split": 2,
                "criterion": "squared_error",
            },
            problem_type="regression",
        )

__init__()

Bind DecisionTreeRegressor 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. criterion="squared_error" is the regression analogue of the classifier node's gini default.

Source code in skyulf-core/skyulf/modeling/regression.py
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
def __init__(self):
    """Bind ``DecisionTreeRegressor`` 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.
    ``criterion="squared_error"`` is the regression analogue of the
    classifier node's ``gini`` default.
    """
    super().__init__(
        model_class=DecisionTreeRegressor,
        default_params={
            "max_depth": None,
            "min_samples_split": 2,
            "criterion": "squared_error",
        },
        problem_type="regression",
    )

ElasticNetRegressionApplier

Bases: SklearnApplier

ElasticNet Regression Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
199
200
class ElasticNetRegressionApplier(SklearnApplier):
    """ElasticNet Regression Applier."""

ElasticNetRegressionCalculator

Bases: SklearnCalculator

ElasticNet Regression Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
@NodeRegistry.register("elasticnet_regression", ElasticNetRegressionApplier)
@node_meta(
    id="elasticnet_regression",
    name="ElasticNet Regression",
    category="Modeling",
    description="Linear regression with combined L1 and L2 priors.",
    params={"alpha": 1.0, "l1_ratio": 0.5, "selection": "cyclic"},
    tags=["requires_scaling", "regression"],
    learns_from_data=True,
)
class ElasticNetRegressionCalculator(SklearnCalculator):
    """ElasticNet Regression Calculator."""

    def __init__(self):
        """Bind ``ElasticNet`` with sklearn's own defaults.

        ``alpha=1.0`` is the total penalty strength and ``l1_ratio=0.5``
        splits it evenly between the L1 and L2 priors; ``selection="cyclic"``
        orders the coordinate-descent updates. All three are restated so the
        node's tunable surface is explicit; ``fit``'s config overrides any of
        them.
        """
        super().__init__(
            model_class=ElasticNet,
            default_params={
                "alpha": 1.0,
                "l1_ratio": 0.5,
                "selection": "cyclic",
            },
            problem_type="regression",
        )

__init__()

Bind ElasticNet with sklearn's own defaults.

alpha=1.0 is the total penalty strength and l1_ratio=0.5 splits it evenly between the L1 and L2 priors; selection="cyclic" orders the coordinate-descent updates. All three are restated so the node's tunable surface is explicit; fit's config overrides any of them.

Source code in skyulf-core/skyulf/modeling/regression.py
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
def __init__(self):
    """Bind ``ElasticNet`` with sklearn's own defaults.

    ``alpha=1.0`` is the total penalty strength and ``l1_ratio=0.5``
    splits it evenly between the L1 and L2 priors; ``selection="cyclic"``
    orders the coordinate-descent updates. All three are restated so the
    node's tunable surface is explicit; ``fit``'s config overrides any of
    them.
    """
    super().__init__(
        model_class=ElasticNet,
        default_params={
            "alpha": 1.0,
            "l1_ratio": 0.5,
            "selection": "cyclic",
        },
        problem_type="regression",
    )

ExtraTreesRegressorApplier

Bases: SklearnApplier

Extra Trees Regressor Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
416
417
class ExtraTreesRegressorApplier(SklearnApplier):
    """Extra Trees Regressor Applier."""

ExtraTreesRegressorCalculator

Bases: SklearnCalculator

Extra Trees Regressor Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
420
421
422
423
424
425
426
427
428
429
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
@NodeRegistry.register("extra_trees_regressor", ExtraTreesRegressorApplier)
@node_meta(
    id="extra_trees_regressor",
    name="Extra Trees Regressor",
    category="Modeling",
    description="Extremely randomised trees — faster than Random Forest, often comparably accurate.",
    params={"n_estimators": 100, "max_depth": None, "min_samples_split": 2},
    tags=["regression"],
    learns_from_data=True,
)
class ExtraTreesRegressorCalculator(SklearnCalculator):
    """Extra Trees Regressor Calculator."""

    def __init__(self):
        """Bind ``ExtraTreesRegressor`` 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
        (``criterion="squared_error"`` being the regression analogue of
        ``gini``), and ``n_jobs=-1`` fits across every core.
        """
        super().__init__(
            model_class=ExtraTreesRegressor,
            default_params={
                "n_estimators": 100,
                "max_depth": None,
                "min_samples_split": 2,
                "min_samples_leaf": 1,
                "criterion": "squared_error",
                "bootstrap": False,
                "n_jobs": -1,
            },
            problem_type="regression",
        )

__init__()

Bind ExtraTreesRegressor 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 (criterion="squared_error" being the regression analogue of gini), and n_jobs=-1 fits across every core.

Source code in skyulf-core/skyulf/modeling/regression.py
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
def __init__(self):
    """Bind ``ExtraTreesRegressor`` 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
    (``criterion="squared_error"`` being the regression analogue of
    ``gini``), and ``n_jobs=-1`` fits across every core.
    """
    super().__init__(
        model_class=ExtraTreesRegressor,
        default_params={
            "n_estimators": 100,
            "max_depth": None,
            "min_samples_split": 2,
            "min_samples_leaf": 1,
            "criterion": "squared_error",
            "bootstrap": False,
            "n_jobs": -1,
        },
        problem_type="regression",
    )

GradientBoostingRegressorApplier

Bases: SklearnApplier

Gradient Boosting Regressor Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
345
346
class GradientBoostingRegressorApplier(SklearnApplier):
    """Gradient Boosting Regressor Applier."""

GradientBoostingRegressorCalculator

Bases: SklearnCalculator

Gradient Boosting Regressor Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
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
@NodeRegistry.register("gradient_boosting_regressor", GradientBoostingRegressorApplier)
@node_meta(
    id="gradient_boosting_regressor",
    name="Gradient Boosting Regressor",
    category="Modeling",
    description="Gradient Boosting for regression.",
    params={"n_estimators": 100, "learning_rate": 0.1, "max_depth": 3},
    tags=["regression"],
    learns_from_data=True,
)
class GradientBoostingRegressorCalculator(SklearnCalculator):
    """Gradient Boosting Regressor Calculator."""

    def __init__(self):
        """Bind ``GradientBoostingRegressor`` 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.
        """
        super().__init__(
            model_class=GradientBoostingRegressor,
            default_params={
                "n_estimators": 100,
                "learning_rate": 0.1,
                "max_depth": 3,
            },
            problem_type="regression",
        )

__init__()

Bind GradientBoostingRegressor 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/regression.py
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
def __init__(self):
    """Bind ``GradientBoostingRegressor`` 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.
    """
    super().__init__(
        model_class=GradientBoostingRegressor,
        default_params={
            "n_estimators": 100,
            "learning_rate": 0.1,
            "max_depth": 3,
        },
        problem_type="regression",
    )

HistGradientBoostingRegressorApplier

Bases: SklearnApplier

HistGradientBoosting Regressor Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
458
459
class HistGradientBoostingRegressorApplier(SklearnApplier):
    """HistGradientBoosting Regressor Applier."""

HistGradientBoostingRegressorCalculator

Bases: SklearnCalculator

HistGradientBoosting Regressor Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
@NodeRegistry.register("hist_gradient_boosting_regressor", HistGradientBoostingRegressorApplier)
@node_meta(
    id="hist_gradient_boosting_regressor",
    name="Hist Gradient Boosting Regressor",
    category="Modeling",
    description="Histogram-based gradient boosting — sklearn's fast LightGBM-style implementation.",
    params={"max_iter": 100, "learning_rate": 0.1, "max_leaf_nodes": 31},
    tags=["regression"],
    learns_from_data=True,
)
class HistGradientBoostingRegressorCalculator(SklearnCalculator):
    """HistGradientBoosting Regressor Calculator."""

    def __init__(self):
        """Bind ``HistGradientBoostingRegressor`` 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.
        """
        super().__init__(
            model_class=HistGradientBoostingRegressor,
            default_params={
                "max_iter": 100,
                "learning_rate": 0.1,
                "max_leaf_nodes": 31,
                "max_depth": None,
                "min_samples_leaf": 20,
                "l2_regularization": 0.0,
                "max_bins": 255,
            },
            problem_type="regression",
        )

__init__()

Bind HistGradientBoostingRegressor 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/regression.py
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
def __init__(self):
    """Bind ``HistGradientBoostingRegressor`` 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.
    """
    super().__init__(
        model_class=HistGradientBoostingRegressor,
        default_params={
            "max_iter": 100,
            "learning_rate": 0.1,
            "max_leaf_nodes": 31,
            "max_depth": None,
            "min_samples_leaf": 20,
            "l2_regularization": 0.0,
            "max_bins": 255,
        },
        problem_type="regression",
    )

KNeighborsRegressorApplier

Bases: SklearnApplier

K-Neighbors Regressor Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
270
271
class KNeighborsRegressorApplier(SklearnApplier):
    """K-Neighbors Regressor Applier."""

KNeighborsRegressorCalculator

Bases: SklearnCalculator

K-Neighbors Regressor Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
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
@NodeRegistry.register("k_neighbors_regressor", KNeighborsRegressorApplier)
@node_meta(
    id="k_neighbors_regressor",
    name="K-Neighbors Regressor",
    category="Modeling",
    description="Regression based on k-nearest neighbors.",
    params={"n_neighbors": 5, "weights": "uniform", "algorithm": "auto"},
    tags=["requires_scaling", "regression"],
    learns_from_data=True,
)
class KNeighborsRegressorCalculator(SklearnCalculator):
    """K-Neighbors Regressor Calculator."""

    def __init__(self):
        """Bind ``KNeighborsRegressor`` with an unweighted 5-neighbour mean.

        ``algorithm="auto"`` leaves sklearn to pick the neighbour-search
        structure from the data's shape and size, and ``n_jobs=-1``
        parallelizes the queries.
        """
        super().__init__(
            model_class=KNeighborsRegressor,
            default_params={
                "n_neighbors": 5,
                "weights": "uniform",
                "algorithm": "auto",
                "n_jobs": -1,
            },
            problem_type="regression",
        )

__init__()

Bind KNeighborsRegressor with an unweighted 5-neighbour mean.

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/regression.py
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
def __init__(self):
    """Bind ``KNeighborsRegressor`` with an unweighted 5-neighbour mean.

    ``algorithm="auto"`` leaves sklearn to pick the neighbour-search
    structure from the data's shape and size, and ``n_jobs=-1``
    parallelizes the queries.
    """
    super().__init__(
        model_class=KNeighborsRegressor,
        default_params={
            "n_neighbors": 5,
            "weights": "uniform",
            "algorithm": "auto",
            "n_jobs": -1,
        },
        problem_type="regression",
    )

LGBMRegressorApplier

Bases: SklearnApplier

LightGBM Regressor 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/regression.py
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
class LGBMRegressorApplier(SklearnApplier):
    """LightGBM Regressor 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.
    """

    def predict(self, df, model_artifact):
        """Delegate to the base predict with the feature-name warning suppressed."""
        with warnings.catch_warnings():
            warnings.filterwarnings("ignore", message=".*valid feature names.*")
            return super().predict(df, model_artifact)

predict(df, model_artifact)

Delegate to the base predict with the feature-name warning suppressed.

Source code in skyulf-core/skyulf/modeling/regression.py
520
521
522
523
524
def predict(self, df, model_artifact):
    """Delegate to the base predict with the feature-name warning suppressed."""
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore", message=".*valid feature names.*")
        return super().predict(df, model_artifact)

LGBMRegressorCalculator

Bases: SklearnCalculator

LightGBM Regressor Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
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
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
@NodeRegistry.register("lgbm_regressor", LGBMRegressorApplier)
@node_meta(
    id="lgbm_regressor",
    name="LightGBM Regressor",
    category="Modeling",
    description="LightGBM: leaf-wise gradient boosting, fast and memory-efficient with categorical support.",
    params={"n_estimators": 100, "num_leaves": 31, "learning_rate": 0.1},
    tags=["regression"],
    learns_from_data=True,
)
class LGBMRegressorCalculator(SklearnCalculator):
    """LightGBM Regressor Calculator."""

    def __init__(self):
        """Bind ``LGBMRegressor`` 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.
        """
        super().__init__(
            model_class=_SamplingLGBMRegressor,
            default_params={
                "n_estimators": 100,
                "num_leaves": 31,
                "learning_rate": 0.1,
                "max_depth": -1,
                "min_child_samples": 20,
                "subsample": 1.0,
                "subsample_freq": None,
                "colsample_bytree": 1.0,
                "reg_alpha": 0.0,
                "reg_lambda": 0.0,
                "boosting_type": "gbdt",
                "n_jobs": -1,
                "verbose": -1,
                "verbosity": -1,
            },
            problem_type="regression",
        )

    def fit(
        self,
        X,
        y,
        config,
        progress_callback=None,
        log_callback=None,
        validation_data=None,
        iteration_callback=None,
        *,
        sample_weight: Any = None,
    ):
        """Delegate to the base fit with the feature-name warning suppressed."""
        with warnings.catch_warnings():
            warnings.filterwarnings("ignore", message=".*valid feature names.*")
            return super().fit(
                X,
                y,
                config,
                progress_callback=progress_callback,
                log_callback=log_callback,
                validation_data=validation_data,
                iteration_callback=iteration_callback,
                sample_weight=sample_weight,
            )

    def _boosting_fit_kwargs(self, model, X_np, y_np, iteration_callback):
        if iteration_callback is None:
            return {}
        return {
            "eval_set": [(X_np, y_np)],
            "callbacks": [LightGBMIterationAdapter(iteration_callback)],
        }

__init__()

Bind LGBMRegressor 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/regression.py
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
def __init__(self):
    """Bind ``LGBMRegressor`` 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.
    """
    super().__init__(
        model_class=_SamplingLGBMRegressor,
        default_params={
            "n_estimators": 100,
            "num_leaves": 31,
            "learning_rate": 0.1,
            "max_depth": -1,
            "min_child_samples": 20,
            "subsample": 1.0,
            "subsample_freq": None,
            "colsample_bytree": 1.0,
            "reg_alpha": 0.0,
            "reg_lambda": 0.0,
            "boosting_type": "gbdt",
            "n_jobs": -1,
            "verbose": -1,
            "verbosity": -1,
        },
        problem_type="regression",
    )

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/regression.py
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
def fit(
    self,
    X,
    y,
    config,
    progress_callback=None,
    log_callback=None,
    validation_data=None,
    iteration_callback=None,
    *,
    sample_weight: Any = None,
):
    """Delegate to the base fit with the feature-name warning suppressed."""
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore", message=".*valid feature names.*")
        return super().fit(
            X,
            y,
            config,
            progress_callback=progress_callback,
            log_callback=log_callback,
            validation_data=validation_data,
            iteration_callback=iteration_callback,
            sample_weight=sample_weight,
        )

LassoRegressionApplier

Bases: SklearnApplier

Lasso Regression Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
166
167
class LassoRegressionApplier(SklearnApplier):
    """Lasso Regression Applier."""

LassoRegressionCalculator

Bases: SklearnCalculator

Lasso Regression Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
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
@NodeRegistry.register("lasso_regression", LassoRegressionApplier)
@node_meta(
    id="lasso_regression",
    name="Lasso Regression",
    category="Modeling",
    description="Linear Model trained with L1 prior as regularizer.",
    params={"alpha": 1.0, "selection": "cyclic"},
    tags=["requires_scaling", "regression"],
    learns_from_data=True,
)
class LassoRegressionCalculator(SklearnCalculator):
    """Lasso Regression Calculator."""

    def __init__(self):
        """Bind ``Lasso`` with sklearn's own defaults.

        ``alpha=1.0`` is the L1 penalty strength, and ``selection="cyclic"``
        walks the features in fixed order during coordinate descent rather
        than randomly. Both are restated so the node's tunable surface is
        explicit; ``fit``'s config overrides either.
        """
        super().__init__(
            model_class=Lasso,
            default_params={"alpha": 1.0, "selection": "cyclic"},
            problem_type="regression",
        )

__init__()

Bind Lasso with sklearn's own defaults.

alpha=1.0 is the L1 penalty strength, and selection="cyclic" walks the features in fixed order during coordinate descent rather than randomly. Both are restated so the node's tunable surface is explicit; fit's config overrides either.

Source code in skyulf-core/skyulf/modeling/regression.py
183
184
185
186
187
188
189
190
191
192
193
194
195
def __init__(self):
    """Bind ``Lasso`` with sklearn's own defaults.

    ``alpha=1.0`` is the L1 penalty strength, and ``selection="cyclic"``
    walks the features in fixed order during coordinate descent rather
    than randomly. Both are restated so the node's tunable surface is
    explicit; ``fit``'s config overrides either.
    """
    super().__init__(
        model_class=Lasso,
        default_params={"alpha": 1.0, "selection": "cyclic"},
        problem_type="regression",
    )

LinearRegressionApplier

Bases: SklearnApplier

Linear Regression Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
54
55
class LinearRegressionApplier(SklearnApplier):
    """Linear Regression Applier."""

LinearRegressionCalculator

Bases: SklearnCalculator

Linear Regression Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@NodeRegistry.register("linear_regression", LinearRegressionApplier)
@node_meta(
    id="linear_regression",
    name="Linear Regression",
    category="Modeling",
    description="Ordinary least squares Linear Regression.",
    params={"fit_intercept": True, "copy_X": True, "n_jobs": -1},
    tags=["requires_scaling", "regression"],
    learns_from_data=True,
)
class LinearRegressionCalculator(SklearnCalculator):
    """Linear Regression Calculator."""

    def __init__(self):
        """Bind ``LinearRegression`` with sklearn's defaults and every core.

        ``fit_intercept=True`` and ``copy_X=True`` are sklearn's own, restated
        so the node's tunable surface is explicit. ``n_jobs=-1`` departs from
        sklearn's ``None``: the solve is dispatched through joblib, which per
        sklearn only pays off on extremely large problems.
        """
        super().__init__(
            model_class=LinearRegression,
            default_params={
                "fit_intercept": True,
                "copy_X": True,
                "n_jobs": -1,
            },
            problem_type="regression",
        )

__init__()

Bind LinearRegression with sklearn's defaults and every core.

fit_intercept=True and copy_X=True are sklearn's own, restated so the node's tunable surface is explicit. n_jobs=-1 departs from sklearn's None: the solve is dispatched through joblib, which per sklearn only pays off on extremely large problems.

Source code in skyulf-core/skyulf/modeling/regression.py
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
def __init__(self):
    """Bind ``LinearRegression`` with sklearn's defaults and every core.

    ``fit_intercept=True`` and ``copy_X=True`` are sklearn's own, restated
    so the node's tunable surface is explicit. ``n_jobs=-1`` departs from
    sklearn's ``None``: the solve is dispatched through joblib, which per
    sklearn only pays off on extremely large problems.
    """
    super().__init__(
        model_class=LinearRegression,
        default_params={
            "fit_intercept": True,
            "copy_X": True,
            "n_jobs": -1,
        },
        problem_type="regression",
    )

RandomForestRegressorApplier

Bases: SklearnApplier

Random Forest Regressor Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
127
128
class RandomForestRegressorApplier(SklearnApplier):
    """Random Forest Regressor Applier."""

RandomForestRegressorCalculator

Bases: SklearnCalculator

Random Forest Regressor Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
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
@NodeRegistry.register("random_forest_regressor", RandomForestRegressorApplier)
@node_meta(
    id="random_forest_regressor",
    name="Random Forest Regressor",
    category="Modeling",
    description="Ensemble of decision trees for regression.",
    params={"n_estimators": 50, "max_depth": 10, "min_samples_split": 5},
    tags=["regression"],
    learns_from_data=True,
)
class RandomForestRegressorCalculator(SklearnCalculator):
    """Random Forest Regressor Calculator."""

    def __init__(self):
        """Bind ``RandomForestRegressor`` 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.
        """
        super().__init__(
            model_class=RandomForestRegressor,
            default_params={
                "n_estimators": 50,
                "max_depth": 10,
                "min_samples_split": 5,
                "min_samples_leaf": 2,
                "n_jobs": -1,
            },
            problem_type="regression",
        )

__init__()

Bind RandomForestRegressor 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/regression.py
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
def __init__(self):
    """Bind ``RandomForestRegressor`` 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.
    """
    super().__init__(
        model_class=RandomForestRegressor,
        default_params={
            "n_estimators": 50,
            "max_depth": 10,
            "min_samples_split": 5,
            "min_samples_leaf": 2,
            "n_jobs": -1,
        },
        problem_type="regression",
    )

RidgeRegressionApplier

Bases: SklearnApplier

Ridge Regression Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
91
92
class RidgeRegressionApplier(SklearnApplier):
    """Ridge Regression Applier."""

RidgeRegressionCalculator

Bases: SklearnCalculator

Ridge Regression Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
 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
@NodeRegistry.register("ridge_regression", RidgeRegressionApplier)
@node_meta(
    id="ridge_regression",
    name="Ridge Regression",
    category="Modeling",
    description="Linear least squares with l2 regularization.",
    params={"alpha": 1.0, "solver": "auto"},
    tags=["requires_scaling", "regression"],
    learns_from_data=True,
)
class RidgeRegressionCalculator(SklearnCalculator):
    """Ridge Regression Calculator."""

    def __init__(self):
        """Bind ``Ridge`` with sklearn's own defaults.

        ``alpha=1.0`` is the L2 penalty strength and ``solver="auto"`` lets
        sklearn pick the solver from the data's shape and dtype. Both are
        restated so the node's tunable surface is explicit; ``fit``'s config
        overrides either.
        """
        super().__init__(
            model_class=Ridge,
            default_params={
                "alpha": 1.0,
                "solver": "auto",
            },
            problem_type="regression",
        )

__init__()

Bind Ridge with sklearn's own defaults.

alpha=1.0 is the L2 penalty strength and solver="auto" lets sklearn pick the solver from the data's shape and dtype. Both are restated so the node's tunable surface is explicit; fit's config overrides either.

Source code in skyulf-core/skyulf/modeling/regression.py
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
def __init__(self):
    """Bind ``Ridge`` with sklearn's own defaults.

    ``alpha=1.0`` is the L2 penalty strength and ``solver="auto"`` lets
    sklearn pick the solver from the data's shape and dtype. Both are
    restated so the node's tunable surface is explicit; ``fit``'s config
    overrides either.
    """
    super().__init__(
        model_class=Ridge,
        default_params={
            "alpha": 1.0,
            "solver": "auto",
        },
        problem_type="regression",
    )

SVRApplier

Bases: SklearnApplier

SVR Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
237
238
class SVRApplier(SklearnApplier):
    """SVR Applier."""

SVRCalculator

Bases: SklearnCalculator

SVR Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
@NodeRegistry.register("svr", SVRApplier)
@node_meta(
    id="svr",
    name="Support Vector Regressor",
    category="Modeling",
    description="Epsilon-Support Vector Regression.",
    params={"C": 1.0, "kernel": "rbf", "gamma": "scale"},
    tags=["requires_scaling", "regression"],
    learns_from_data=True,
)
class SVRCalculator(SklearnCalculator):
    """SVR Calculator."""

    def __init__(self):
        """Bind ``SVR`` with sklearn's own defaults.

        ``C=1.0``, ``kernel="rbf"`` and ``gamma="scale"`` are all sklearn's,
        restated so the node's tunable surface is explicit. The width of the
        epsilon-insensitive tube stays at sklearn's ``epsilon=0.1`` unless
        ``fit``'s config overrides it.
        """
        super().__init__(
            model_class=SVR,
            default_params={"C": 1.0, "kernel": "rbf", "gamma": "scale"},
            problem_type="regression",
        )

__init__()

Bind SVR with sklearn's own defaults.

C=1.0, kernel="rbf" and gamma="scale" are all sklearn's, restated so the node's tunable surface is explicit. The width of the epsilon-insensitive tube stays at sklearn's epsilon=0.1 unless fit's config overrides it.

Source code in skyulf-core/skyulf/modeling/regression.py
254
255
256
257
258
259
260
261
262
263
264
265
266
def __init__(self):
    """Bind ``SVR`` with sklearn's own defaults.

    ``C=1.0``, ``kernel="rbf"`` and ``gamma="scale"`` are all sklearn's,
    restated so the node's tunable surface is explicit. The width of the
    epsilon-insensitive tube stays at sklearn's ``epsilon=0.1`` unless
    ``fit``'s config overrides it.
    """
    super().__init__(
        model_class=SVR,
        default_params={"C": 1.0, "kernel": "rbf", "gamma": "scale"},
        problem_type="regression",
    )

XGBRegressorApplier

Bases: SklearnApplier

XGBoost Regressor Applier.

Source code in skyulf-core/skyulf/modeling/regression.py
609
610
class XGBRegressorApplier(SklearnApplier):
    """XGBoost Regressor Applier."""

XGBRegressorCalculator

Bases: SklearnCalculator

XGBoost Regressor Calculator.

Source code in skyulf-core/skyulf/modeling/regression.py
612
613
614
615
616
617
618
619
620
621
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
@NodeRegistry.register("xgboost_regressor", XGBRegressorApplier)
@node_meta(
    id="xgboost_regressor",
    name="XGBoost Regressor",
    category="Modeling",
    description="Extreme Gradient Boosting regressor.",
    params={"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3},
    tags=["regression"],
    learns_from_data=True,
)
class XGBRegressorCalculator(SklearnCalculator):
    """XGBoost Regressor Calculator."""

    def __init__(self):
        """Bind ``XGBRegressor`` 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.
        """
        super().__init__(
            model_class=XGBRegressor,
            default_params={
                "n_estimators": 100,
                "max_depth": 6,
                "learning_rate": 0.3,
                "subsample": 0.8,
                "colsample_bytree": 0.8,
                "n_jobs": -1,
            },
            problem_type="regression",
        )

    def _boosting_fit_kwargs(self, model, X_np, y_np, iteration_callback):
        if iteration_callback is None or XgboostIterationAdapter is None:
            return {}
        # XGBoost 3.x reads callbacks from the estimator itself (they were
        # removed from fit()). eval_set is display-only (no early
        # stopping), so the trained model is identical to a plain fit — it
        # just streams per-round training loss for the live chart.
        model.callbacks = [
            XgboostIterationAdapter(iteration_callback, total=int(model.n_estimators))
        ]
        return {
            "eval_set": [(X_np, y_np)],
            "verbose": False,
            "_detach_callbacks": True,
        }

__init__()

Bind XGBRegressor 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/regression.py
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
def __init__(self):
    """Bind ``XGBRegressor`` 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.
    """
    super().__init__(
        model_class=XGBRegressor,
        default_params={
            "n_estimators": 100,
            "max_depth": 6,
            "learning_rate": 0.3,
            "subsample": 0.8,
            "colsample_bytree": 0.8,
            "n_jobs": -1,
        },
        problem_type="regression",
    )