_cost_metrics
qubit_approximant.core.cost._cost_metrics
Metrics and their gradients to use in the cost function and optimization process.
grad_kl_divergence(fn, fn_approx, grad_fn_approx)
Returns the gradient of the KL divergence.
Source code in qubit_approximant/core/cost/_cost_metrics.py
51 52 53 |
|
grad_log_cosh(fn, fn_approx, grad_fn_approx)
Returns the gradiend of the logarithm of the hyperbolic cosine.
Source code in qubit_approximant/core/cost/_cost_metrics.py
63 64 65 66 |
|
grad_mse(fn, fn_approx, grad_fn_approx)
Returns the gradient of the minimum square error.
Source code in qubit_approximant/core/cost/_cost_metrics.py
13 14 15 16 |
|
grad_mse_weighted(fn, fn_approx, grad_fn_approx)
Returns the gradient of the weighted minimum square error.
Source code in qubit_approximant/core/cost/_cost_metrics.py
25 26 27 28 29 30 |
|
grad_rmse(fn, fn_approx, grad_fn_approx)
Returns the gradient of the root minimum square error.
Source code in qubit_approximant/core/cost/_cost_metrics.py
38 39 40 41 42 |
|
kl_divergence(fn, fn_approx)
Returns the KL divergence. This metric should be used with strictly real positive functions
Source code in qubit_approximant/core/cost/_cost_metrics.py
45 46 47 48 |
|
log_cosh(fn, fn_approx)
Returns the logarithm of the hyperbolic cosine. This metric should be used with strictly real positive functions
Source code in qubit_approximant/core/cost/_cost_metrics.py
56 57 58 59 60 |
|
mse(fn, fn_approx)
Returns the minimum square error.
Source code in qubit_approximant/core/cost/_cost_metrics.py
7 8 9 10 |
|
mse_weighted(fn, fn_approx)
Returns a weighted minimum square error.
Source code in qubit_approximant/core/cost/_cost_metrics.py
19 20 21 22 |
|
rmse(fn, fn_approx)
Returns the root minimum square error.
Source code in qubit_approximant/core/cost/_cost_metrics.py
33 34 35 |
|