Author:  Pierre Barbier de Reuille <pierre.barbierdereuille@gmail.com> 

This modules implement functions to test and plot parametric regression.
This function takes the output of a curve fitting experiment and store all the relevant information for evaluating its success in the result.
Parameters: 


Return type:  
Returns:  Data structure summarising the fitting and its evaluation 
Compute quantities needed to evaluate the quality of the estimation, based solely on the residuals.
Return type:  ResidualMeasures 

Returns:  the scaled residuals, their ordering, the theoretical quantile for each residuals, and the expected value for each quantile. 
Plot the distribution of the residuals.
Returns:  the handle toward the histogram and the plot of the fitted normal distribution 

Plot the residuals against the X axis
Parameters: 


The shapes of xdata and res must be the same
Returns:  The handles of the the plots of the residuals and of the smoothed residuals. 

Plot the scaled location, given the dependant values and scaled residuals.
Parameters: 


Returns:  the handles for the data and the smoothed curve 
Draw a QQ Plot from the sorted, scaled residuals (i.e. residuals sorted and normalized by their standard deviation)
Parameters: 


Returns:  handle to the data plot 
Plot, in a single figure, all four residuals evaluation plots: plot_residuals(), plot_dist_residuals(), scaled_location_plot() and qqplot().
Parameters: 


Return type:  
Returns:  The handles to all the plots 
Use matplotlib to display the result of a fit, and return the list of plots used
Return type:  Plot1dResult 

Returns:  hangles to the various figures and plots 
Write the result of a fitting and its evaluation to a CSV file.
Parameters: 


Most function return a tuple. For easier access, there are named tuple, i.e. tuples that can be accessed by name.
Note
This is a class created with pyqt_fit.utils.namedtuple().
Fitted function (i.e. result of the fitted function)
Description of the function being fitted
Name of the parameters fitted
Explaining variables used for fitting
Dependent variables observed during experiment
Name of the explaining variables
Name of the dependent variabled
Name of the residuals
Function used to compute the residuals
Optimal parameters
Residuals computed with the parameters popt
Evaluation of the optimized function on the observed points
Points on which the function has been interpolated (may be equal to xdata)
Interpolated function on eval_points (may be equal to yopt)
Evaluated function for each data points, sorted in increasing residual order
Scaled residuals, ordered by increasing residuals
Expected values for the residuals, based on their quantile
List of confidence intervals evaluated (in percent)
List of arrays giving the confidence intervals for the dependent variables and for the parameters.
Object returned by the confidence interval method
Note
This is a class created with pyqt_fit.utils.namedtuple().
Scaled residuals, sorted
Sorting indices for the residuals
Quantiles of the scaled residuals
Expected values of the quantiles for a normal distribution
Note
This is a class created with pyqt_fit.utils.namedtuple().
Handle to the figure
Handles created by plot_residuals()
Handles created by scaled_location_plot()
Handles created by plot_dist_residuals()
Note
This is a class create with pyqt_fit.utils.namedtuple(). Also, it contains all the first of ResTestResult at the end of the tuple.
Handle to the figure with the data and fitted curve
Handle to the fitted curve
Handle to the data
Handles to the confidence interval curves