Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Covariance matrix for

Link copied to clipboard
Link copied to clipboard
class OptimizationIterations(val maxIterations: Int) : OptimizationFeature

Maximum allowed number of iterations

Link copied to clipboard
Link copied to clipboard

Free parameters of the optimization

Link copied to clipboard
Link copied to clipboard
open class OptimizationResult<T>(val point: Map<Symbol, T>) : OptimizationFeature
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Specify the way to compute distance from point to the curve as DifferentiableExpression

Link copied to clipboard

Compute a wight of the point. The more the weight, the more impact this point will have on the fit. By default, uses Dispersion^-1

Link copied to clipboard

An optimizer based onf Fyodor Tkachev's quasi-optimal weights method. See the article.

Link copied to clipboard
class QowRuns(val runs: Int) : OptimizationFeature
Link copied to clipboard
class XYFit(val data: XYColumnarData<Double, Double, Double>, val model: DifferentiableExpression<Double>, val features: FeatureSet<OptimizationFeature>, pointToCurveDistance: PointToCurveDistance = PointToCurveDistance.byY, pointWeight: PointWeight = PointWeight.byYSigma, val xSymbol: Symbol = Symbol.x) : OptimizationProblem<Double>

A fit problem for X-Y-Yerr data. Also known as "least-squares" problem.

Functions

Link copied to clipboard
suspend fun XYColumnarData<Double, Double, Double>.fitWith(optimizer: Optimizer<Double, XYFit>, modelExpression: DifferentiableExpression<Double>, startingPoint: Map<Symbol, Double>, vararg features: OptimizationFeature = emptyArray(), xSymbol: Symbol = Symbol.x, pointToCurveDistance: PointToCurveDistance = PointToCurveDistance.byY, pointWeight: PointWeight = PointWeight.byYSigma): XYFit

suspend fun <I : Any, A : ExtendedField<I>, ExpressionAlgebra<Double, I>> XYColumnarData<Double, Double, Double>.fitWith(optimizer: Optimizer<Double, XYFit>, processor: AutoDiffProcessor<Double, I, A>, startingPoint: Map<Symbol, Double>, vararg features: OptimizationFeature = emptyArray(), xSymbol: Symbol = Symbol.x, pointToCurveDistance: PointToCurveDistance = PointToCurveDistance.byY, pointWeight: PointWeight = PointWeight.byYSigma, model: A.(I) -> I): XYFit

Fit given data with a model provided as an expression

Link copied to clipboard
Link copied to clipboard

Optimize given XY (least squares) problem using this function Optimizer. The problem is treated as maximum likelihood problem and is done via maximizing logarithmic likelihood, respecting possible weight dependency on the model and parameters.

Link copied to clipboard
suspend fun <T> DifferentiableExpression<T>.optimizeWith(optimizer: Optimizer<T, FunctionOptimization<T>>, vararg startingPoint: Pair<Symbol, T>, builder: FunctionOptimizationBuilder<T>.() -> Unit = {}): FunctionOptimization<T>

suspend fun <T : Any> DifferentiableExpression<T>.optimizeWith(optimizer: Optimizer<T, FunctionOptimization<T>>, startingPoint: Map<Symbol, T>, vararg features: OptimizationFeature): FunctionOptimization<T>

Optimizes differentiable expression using specific optimizer form given startingPoint.

Link copied to clipboard
fun <T> OptimizationBuilder<T, *>.startAt(startingPoint: Map<Symbol, T>)
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard

Compute chi squared value for completed fit. Return null for incomplete fit

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Get the starting point for optimization. Throws error if not defined.