quri_parts.algo.utils package#

quri_parts.algo.utils.exp_fitting(x_data: Iterable[float], y_data: Iterable[float], order: int, point: float) FittedResult#

Curve fitting with an exponential ansatz f(x) = a + b exp(p(x)), where p(x) is a polynomial of a given order.

Parameters:
  • x_data – x-coordinates for fitting.

  • y_data – y-coordinates for fitting.

  • order – Order of the polynomial on the exponential used for fitting.

  • point – A point at which the fitted function to be evaluated.

Returns:

The fitted parameters (can be accessed with parameters) and a value at the input point of the fitted function (can be accessed with value).

quri_parts.algo.utils.exp_fitting_with_const(x_data: Iterable[float], y_data: Iterable[float], order: int, constant: float, point: float) FittedResult#

Curve fitting with an exponential ansatz f(x) = constant + b exp(p(x)), where p(x) is a polynomial of a given order and constant is a known parameter (obtained as the infinite limit f(x->inf) when f(x) converges to a finite asymptotic value).

Parameters:
  • x_data – x-coordinates for fitting.

  • y_data – y-coordinates for fitting.

  • order – Order of the polynomial on the exponential used for fitting.

  • constant – A constant deduced from asymptotic behavior f(x->inf).

  • point – A point at which the fitted function to be evaluated.

Returns:

The fitted parameters (can be accessed with parameters) and a value at the input point of the fitted function (can be accessed with value).

quri_parts.algo.utils.exp_fitting_with_const_log(x_data: Iterable[float], y_data: Iterable[float], order: int, constant: float, point: float) FittedResult#

Log fitting with an exponential ansatz f(x) = constant + b exp(p(x)), where p(x) is a polynomial of a given order and constant is a known parameter (obtained as the infinite limit f(x->inf) when f(x) converges to a finite asymptotic value).

Parameters:
  • x_data – x-coordinates for fitting.

  • y_data – y-coordinates for fitting.

  • order – Order of the polynomial on the exponential used for fitting.

  • constant – A constant deduced from asymptotic behavior f(x->inf).

  • point – A point at which the fitted function to be evaluated.

Returns:

The fitted parameters (can be accessed with parameters) and a value at the input point of the fitted function (can be accessed with value).

quri_parts.algo.utils.polynomial_fitting(x_data: Iterable[float], y_data: Iterable[float], order: int, point: float) FittedResult#

Polynomial fitting with an polynomial of a given order.

Parameters:
  • x_data – x-coordinates for fitting.

  • y_data – y-coordinates for fitting.

  • order – Order of the polynomial used for fitting.

  • point – A point at which the fitted function to be evaluated.

Returns:

The fitted parameters (can be accessed with parameters) and a value at the input point of the fitted function (can be accessed with value).

Submodules#