Commit 869ac61f authored by Viktor Reshniak's avatar Viktor Reshniak
Browse files

change description of `def fit`

parent 0274e1d2
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -1744,19 +1744,22 @@ class PeakHistogram(object):
		return output


	def fit(self, bins=None, return_bins=False, loss='mle', solver='BFGS', params_init=None, params_lbnd=None, params_ubnd=None):
	def fit(self, bins=None, return_bins=False, loss='mle', solver='BFGS', tol=1.e-6, params_init=None, params_lbnd=None, params_ubnd=None):
		'''
		Inputs
		Inputs, all optional
		------
		  hist_ws:	histogram workspace
		  bins:		rebinning algorithm, one of [None, 'knuth', 'adaptive_knuth', int, list]
		  loss:		fitting criterion, one of ['pearson_chi', 'neumann_chi', 'mle']
		  cnt:		initial estimate for the peak center
		  dcnt:		bounds for the location of the peak center
		  bins:			rebinning algorithm, one of [None, 'knuth', 'adaptive_knuth', int, list of int]
		  return_bins:	whether return bins or not
		  loss:			fitting criterion, one of ['mle', 'pearson_chi', 'neumann_chi']
		  solver:		minimizer, one of ['BFGS', 'L-BFGS-B', 'Newton-CG']
		  tol:			tolerance of the solution
		  params_*:		initialization and bound on the parameters

		Outputs
		-------
		  (1+(1+ndims+ndims**2)*npeaks,) ndarray of parameters
		  fit_params:	optimal parameters
		  success:		convergence flag
		  bins:			optional, returned bins
		'''

		###########################################################################