kumulant

SoftmaxRegressionResult

@Serializable
@SerialName(value = "SoftmaxRegressionResult")
data class SoftmaxRegressionResult(val featureSize: Int, val numClasses: Int, val weights: DenseMatrix, val biases: DenseVector, val totalWeights: Double, val step: Long, val crossEntropy: Double) : Result(source)

Snapshot from SoftmaxRegressionStat: per-class linear-model parameters plus cumulative bookkeeping. The K-by-p weights matrix and length-K biases vector define the linear predictors eta[k] = biases[k] + weights[k] . x; the predicted class probability is the softmax over the K logits.

Constructors

Link copied to clipboard
constructor(featureSize: Int, numClasses: Int, weights: DenseMatrix, biases: DenseVector, totalWeights: Double, step: Long, crossEntropy: Double)

Properties

Link copied to clipboard

Per-class intercept; length numClasses.

Link copied to clipboard

Accumulated weighted negative log-likelihood (cross-entropy) over the stream.

Link copied to clipboard

Number of input features (columns of weights).

Link copied to clipboard

Number of classes (rows of weights and length of biases).

Link copied to clipboard
val step: Long

Number of update calls absorbed.

Link copied to clipboard

Cumulative observation weight folded in.

Link copied to clipboard

K-by-p weight matrix; weights[k][i] is the coefficient on feature i for class k.

Functions

Link copied to clipboard
fun logit(x: VectorView, k: Int): Double

Linear predictor for class k: biases[k] + weights[k] . x.

Link copied to clipboard

Argmax class index for x.

Link copied to clipboard

Softmax probabilities across all classes for x; length numClasses.

SoftmaxRegressionResult

constructor(featureSize: Int, numClasses: Int, weights: DenseMatrix, biases: DenseVector, totalWeights: Double, step: Long, crossEntropy: Double)(source)

biases

Per-class intercept; length numClasses.

crossEntropy

Accumulated weighted negative log-likelihood (cross-entropy) over the stream.

featureSize

Number of input features (columns of weights).

logit

Linear predictor for class k: biases[k] + weights[k] . x.

numClasses

Number of classes (rows of weights and length of biases).

predict

Argmax class index for x.

probabilities

Softmax probabilities across all classes for x; length numClasses.

step

Number of update calls absorbed.

totalWeights

Cumulative observation weight folded in.

weights

K-by-p weight matrix; weights[k][i] is the coefficient on feature i for class k.