uf3.regression.least_squaresΒΆ
This module provides the WeightedLinearModel class for fitting UF potentials from featurized DataFrames using regularized least squares.
Functions
Deprecated utility function for weighting gram matrix. |
|
Deprecated utility function for weighting inputs/outputs. |
|
Arrange coefficients by degree of interaction. |
|
Batched evaluation of gram matrix (x^T x) and ordinate (x^T y). |
|
Convenience function for optimization workflow. |
|
Extract energy/force inputs/outputs from DataFrame. |
|
Identify coefficient index corresponding to possible potential well. |
|
Freeze coefficients of the solution (e.g. |
|
Apply freezing mask to regularizer, eliminating masked columns. |
|
Freezing mask is the set difference between the range of feature indices and the indices to be excluded (col_idx). |
|
Solves the linear least-squares problem Ax=y. |
|
LU factorization for least-squares solution using np.linalg.solve(). |
|
Mean-absolute error metric. |
|
Compute gram matrix (x^T x) and ordinate (x^T y). |
|
Postprocess 2B coefficients to enforce repulsive core. |
|
Reverse freezing operations by arranging learned coefficients and frozen coefficients using the mask. |
|
Root-mean-square error metric. |
|
Convenience function for optimization workflow. |
|
Check for consistency between regularizer matrix and number of features. |
|
Solves the linear least-squares problem with optional Tikhonov regularizer matrix and optional weighting. |
Classes
Base class for linear regression. |
|
Convenience class for computing online variance and mean |
|
Handler class for regularized linear least squares using energies and forces and basis set provided by bspline.BsplineBasis. |