PlatformReporting

vecxt_re.PlatformReporting

Platform-specific reporting implementations for JVM.

Uses a streaming single-pass algorithm to compute all loss metrics efficiently. The algorithm processes groups inline (avoiding the allocation of an intermediate array) and uses Welford's online algorithm for numerically stable variance computation.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

inline def lossReportFast(calcd: (layer: Layer, cededToLayer: Array[Double]), numIterations: Int, years: Array[Int], limit: ReportDenominator): (name: String, limit: Double, el: Double, stdDev: Double, attachProb: Double, exhaustProb: Double)

Computes loss report metrics in a single pass using Welford's online algorithm.

Computes loss report metrics in a single pass using Welford's online algorithm.

Instead of calling groupSum multiple times (for attachment, exhaustion, std, and EL), this method iterates through the grouped sums once, accumulating all intermediate results:

  • Sum for expected loss (EL)
  • Count of attached iterations (groupSum > 0)
  • Count of exhausted iterations (groupSum > ReReporting.exhaustThreshold, i.e. aggLimit * share)
  • Running mean and M2 for Welford's variance algorithm

Value parameters

calcd

Tuple of (layer, cededToLayer array)

limit

Report denominator for normalizing results

numIterations

Number of iterations/years

years

Sorted array of 1-based iteration indices, in 1..numIterations, same length as calcd.cededToLayer. Checked at no extra cost: throws IllegalArgumentException if violated.

Attributes

Returns

Named tuple with all loss report metrics