|
24 | 24 |
|
25 | 25 | from abc import ABCMeta, abstractmethod |
26 | 26 |
|
27 | | -from bfit.fit import _BaseFit, KLDivergenceFPI, ScipyFit |
28 | | -from bfit.measure import SquaredDifference |
29 | | -from bfit.model import AtomicGaussianDensity |
30 | 27 | import numpy as np |
31 | 28 | from scipy.optimize import nnls |
32 | 29 |
|
| 30 | +from bfit.fit import KLDivergenceFPI, ScipyFit, _BaseFit |
| 31 | +from bfit.measure import SquaredDifference |
| 32 | +from bfit.model import AtomicGaussianDensity |
| 33 | + |
33 | 34 | __all__ = ["GreedyLeastSquares", "GreedyKLFPI"] |
34 | 35 |
|
35 | 36 |
|
@@ -801,6 +802,7 @@ def optimize_using_nnls(true_dens, cofactor_matrix): |
801 | 802 | row_nnls_coefficients = nnls(cofactor_matrix, b_vector) |
802 | 803 | return row_nnls_coefficients[0] |
803 | 804 |
|
| 805 | + # pylint: disable=arguments-differ |
804 | 806 | def get_optimization_routine(self, params, local=False): |
805 | 807 | r"""Optimize least-squares using nnls and scipy.optimize from ScipyFit.""" |
806 | 808 | # First solves the optimal coefficients (while exponents are fixed) using NNLS. |
@@ -946,6 +948,7 @@ def get_best_one_function_solution(self): |
946 | 948 | exps = 3. * self.integral_dens / (2. * 4. * np.pi * denom) |
947 | 949 | return np.array([self.integral_dens, exps]) |
948 | 950 |
|
| 951 | + # pylint: disable=arguments-differ |
949 | 952 | def get_optimization_routine(self, params, local=False): |
950 | 953 | r"""Optimize KL using KL-FPI method.""" |
951 | 954 | coeffs, exps = params[:len(params)//2], params[len(params)//2:] |
|
0 commit comments