Methods of TotalFit class
TotalFit class defines objects that can load Dataset objects and subject this composite dataset to fitting with multiple models (each fit to its own piece of data). In this document I purposefully omit parameter lists of all methods because parameter lists may be changed in the future releases while the meaning of the method will, generally, remain the same.
For specific parameter lists of any methods see TotalFit.m
Categories
Back to Categories
CREATING TOTALFIT OBJECT
- TotalFit() - create empty TotalFit object
- make_a_copy() - duplicate entire object
Back to Categories
LOADING DATA
Back to Categories
ACCESS TO INDIVIDUAL DATASETS
These functions mirror all the functions available for Dataset object. They, however, restrict users access to properties to keep TotalFit object consistent with the Dataset objects. Once all desired datasets are loaded they may be accessed through a a set of methods that mirror methods of Dataset object. These methods start with 'dataset_' and supplied with dataset_number. We do not have direct write-access to the loaded Dataset objects. The methods make sure any changes to the individual objects (ie changing the active model) are accounted for in the TotalFit object as well.
GENERAL METHODS
- dataset_set_name()
- dataset_list_models()
- dataset_set_active_model() - set active model, solver and solver options for the dataset. resets_fitting environment!
- dataset_show_active_model()
- dataset_set_X_for_simulation() - Set new X-data for a simulation dataset
- dataset_set_parameters() - Set parameters for visualization of initial guess and fitting
- dataset_set_ranges_and_limits() - Set parameter ranges for Monte-Carlo and parameter limits
- dataset_show_parameter_ranges_limits() - Return parameter values, Monte-Carlo ranges and parameter limits as a formatted text
- dataset_SS() - Return dataset's weighted sum of squares using best-fit parameter (previously determined)
- dataset_R_square() - Return R-square of the best-fit data
- dataset_set_solver() - enables to change default settings of the numeric solver for models that require numeric solutions
to compute the signal. (The default settings are given in the corresponding class for the particular dataset.)
FITTING METHODS
Warning: these methods do not allow linking of parameter or setting them to variable or constant. Use TotalFit functionality instead!
- dataset_simple_fit() - Perform simple fitting of one dataset w/o error estimate
- dataset_fit() - Peform fitting of individual dataset with error estimate
- dataset_show_fit_statistics() - Show statistics for the individual dataset
- dataset_best_fit_parameters() - Return individual best-fit parameters of the dataset
PLOTTING METHODS
- dataset_plot_data() - Plot just the data
- dataset_plot_model(..., simulation_parameters) - Plot model (curve) with arbitrary parameters
- dataset_plot_fit() - Plot model with best-fit parameters and the data
Back to Categories
DATASET SERIES
GENERAL METHODS
- series_names() - Display names of series in the TotalFit object
- define_series() - Define a series of datasets
- dataset_index() - Return a index of a dataset in dataset_array using a series name and a relative dataset number in a series
- show_series_datasets() - Show datasets assigned to a series
MANIPULATING MODELS
- change_model_in_series() - assign a model to all datasets (resets_fitting environment!)
- check_model_in_series() - make sure all datasets have the same model
IMPORTING DATA
- trim_series_dataset() - Trim dataset (cut X-values to a specific range)
- import_series() - Import a series from another TotalFit object
ASSOCIATING SERIES WITH A TITRATION
- add_titration() - Import a Titration object
- associate_series_with_titration() - Connect a data series name to a Titration object
SIMULATION SERIES
- create_simulation_series() - create a series of simulation Dataset objects
- simulate_series() - calculate simulated data
PLOTTING METHODS
- set_XY_ranges_series() - Set plotting ranges for a series
- plot_one_series_dataset() - Plot specific dataset of the series
- plot_series_datasets() - Plot series datasets one-by-one
- plot_1D_series() - Plot series on one graph (X-Y coordinates, assuming these are 1D datasets).
- grid_plot_series() - Plotting the series model curves with an incremented parameter
- show_color_key() - Show color key for plots with multiple datasets
FITTING WITH MODELS
- It is advisable to perform fitting of individual datasets under control of TotalFit fit() function because it allows flexible assignment of fixed and variable parameters.
- dataset_show_fit_statistics() - display current statistics for the best-fit parameters
Back to Categories
SIMULATION SERIES: MODEL SIMULATIONS
- create_simulation_series() - create a series of datasets for model simulations
- simulate_series() - synthesize data including simulated noise
- plot_1D_series() - plot the results. More on plotting results
See DATASET SERIES for more information on manipulating series of datasets.
Back to Categories
INITIALIZING RELATION MATRIX
Back to Categories
LINKING PARAMETERS TO HAVE THEM FIT TOGETHER
IMPORTANT NOTE: After you linked or unlinked parameters you need to regenerate fitting environment (relation matrix - see below in GENERATING ALL-PARAMETER AND LOOKUP VECTORS) and repeat assigning values of parameters, because linking process creates new dependencies and parameter values need to be propagated to all datasets accordingly.
Back to Categories
GENERATING FITTING ENVIRONMENT
Generating fitting environment is a key step that prepares TotalFit object for fitting of multiple models to experimental data stored in multiple datasets.
NOTE: we need to reissue this command any time we changed the models in the datasets!
Back to Categories
LOADING PARAMETER VALUES
There are differenc ways to load starting parameters and ranges into all-parameter vector and individual datasets. In all cases, loading an empty array [] is interpreted as a signal to keep the previous values.
NOTE: The parameter ranges are not true bounds for fitting but rather ranges for choosing random starting parameter sets in Monte-Carlo error analysis.
- assign_one_parameter() - one parameter in a specific dataset
- set_ranges() - Set ranges and limits for one parameter. Entering [ ] keeps current values.
- assign_parameter_values() - assign all parameters for the datasets
- update_parameters_from_dataset() - move parameter values from the dataset to all-parameter vector
- update_parameters_from_all_datasets() - do the same (as above) for all datasets
- - reverse operation - used after assigning some parameters to propagate values to all linked datasets
- () - assignment of a parameter in a dataset series, which is unlinked, that is individual for each dataset
- get_values_from_all_parameters() - obtain current parameters for a given dataset from all-parameter vector
- get_ranges_from_all_parameters() - obtain current Monte-Carlo ranges and parameter bounds for a given dataset from all_MonteCarlo and all_parameter_limits vectors
- get_conf_from_all_parameters() - obtain most recent dataset-specific confidence intervals from all-parameter vector
Back to Categories
VARIABLE/FIXED MODES FOR PARAMETERS
Back to Categories
FITTING WITHOUT ERROR ESTIMATE
Back to Categories
FITTING WITH DETERMINATION OF CONFIDENCE INTERVALS
See also docs/concepts/Concepts of data fitting
Back to Categories
EVALUATION OF FITTING RESULTS
Back to Categories
WORKING WITH TITRATIONS
Back to Categories
WORKING WITH SPECTRAL DATA
Back to Categories
WORKING WITH RELAXATION DISPERSION DATA
Back to Categories
Back to Categories