detkit.FitLogdet#
- class detkit.FitLogdet(m=2, n=0, scale_x=1, scale_y=1)#
Fit and extrapolate log-determinant of large matrices.
- Parameters:
- mint, default=2
Number of terms in the Laurent series with logarithm
- nint, default=0
Number of terms in the Laurent series without logarithm
- scale_xfloat, default=1
Scales x input data by a factor.
- scale_yfloat, default=1
Scales y input data by a factor.
Notes
The fitting model is based on FLODANCE algorithm [1], given as
\[y(x) = a_0 + a_{1} x + \left( \nu + \sum_{i=1}^m b_{i} x^{-i} \right) \ln(x!) + \sum_{i=1}^n c_{i} x^{-i}\]References
[1]Ameli, S., van der Heide, C., Hodgkinson, L., Roosta, F., and Mahoney, M. W. (2025). Determinant Estimation under Memory Constraints and Neural Scaling Laws.
Examples
>>> from detkit import FitLogdet >>> # Create an interpolator object using m=6 truncated Laurent series. >>> flodet = FitLogdet(m=6) >>> # Fit model to data >>> flodet.fit(x_fit, y_fit) >>> # Evaluate fitted curve >>> y_eval = flodet.eval(x_eval)
- Attributes:
- param
Parameters of curve fitting.
- res
Result of curve fitting optimization.
Methods
fit
(x, y[, verbose])Fit model to data.
eval
(x)Evaluate fitted curve at a given
x
.