kumulant

StochasticRegression

@Serializable
@SerialName(value = "StochasticRegression")
data class StochasticRegression(val featureSize: Int, val optimizer: OptimizerSpec = Sgd(), val biasOptimizer: OptimizerSpec = optimizer, val penalty: Penalty = Penalty.None, val link: Link = Link.Identity) : RegressionStatSpec<StochasticRegressionResult> (source)

Spec for StochasticRegressionStat: online GLM with a configurable optimizer.

Constructors

Link copied to clipboard
constructor(featureSize: Int, optimizer: OptimizerSpec = Sgd(), biasOptimizer: OptimizerSpec = optimizer, penalty: Penalty = Penalty.None, link: Link = Link.Identity)

Properties

Link copied to clipboard

Update rule for the bias scalar; defaults to optimizer.

Link copied to clipboard

Number of input features.

Link copied to clipboard
val link: Link

GLM link function; Link.Identity gives plain OLS.

Link copied to clipboard

Per-coordinate update rule for the weight vector.

Link copied to clipboard

Gradient-step regulariser. Requires Sgd optimizers.

Functions

Link copied to clipboard

Wrap this regression spec so updates are forwarded only when pred evaluates true.

Link copied to clipboard
fun <R : Result> RegressionStatSpec<R>.materialize(concurrency: Concurrency = Concurrency.None): RegressionStat<R>
fun StatSpec.materialize(concurrency: Concurrency = Concurrency.None): Stat<*>

Construct a live stat from any StatSpec, dispatching on its modality. Useful for code paths (like StatSchemaDef.materialize) that iterate over an erased Map<String, StatSpec> and don't statically know the modality.

Link copied to clipboard
fun <R : Result> RegressionStatSpec<R>.minMaxScaleFeatures(targetLow: Double = 0.0, targetHigh: Double = 1.0): RegressionStatSpec<R>

Element-wise min-max scale a regression spec's feature vector.

Link copied to clipboard

Wrap this regression spec to keep each update with probability rate; seed feeds the PRNG.

Link copied to clipboard

Element-wise standardise a regression spec's feature vector.

Link copied to clipboard

Wrap this regression spec so it only sees one in every every updates.

Link copied to clipboard

Wrap this regression spec so x is remapped by expr before the inner stat sees it.

Link copied to clipboard

Wrap this regression spec so y is remapped by expr before the inner stat sees it.

Link copied to clipboard

Wrap this regression spec so every update's weight is multiplied by expr.eval(0, y, v).

Link copied to clipboard

Wrap this regression spec so every update uses weight regardless of caller input.

StochasticRegression

constructor(featureSize: Int, optimizer: OptimizerSpec = Sgd(), biasOptimizer: OptimizerSpec = optimizer, penalty: Penalty = Penalty.None, link: Link = Link.Identity)(source)

biasOptimizer

Update rule for the bias scalar; defaults to optimizer.

featureSize

Number of input features.

optimizer

Per-coordinate update rule for the weight vector.

penalty

Gradient-step regulariser. Requires Sgd optimizers.