IMP.bff
|
Class for scoring model fluorescence decay. More...
#include <DecayScore.h>
Public Member Functions | |
DecayCurve * | get_model () |
void | set_model (DecayCurve *v) |
DecayCurve * | get_data () |
void | set_data (DecayCurve *v) |
std::vector< double > & | get_weighted_residuals () |
double | get_score (int start=0, int stop=-1, const char *score_type=nullptr) |
void | set_score_type (std::string v) |
std::string | get_score_type () |
void | set (DecayCurve *model, DecayCurve *data, std::string score_type="poisson", int start=0, int stop=-1) |
double | score (DecayCurve *model=nullptr) |
DecayScore (DecayCurve *model=nullptr, DecayCurve *data=nullptr, std::string score_type="poisson", int start=0, int stop=-1) | |
Constructs a DecayScore object with the specified model, experimental data, score type, and range of data points. | |
~DecayScore () override | |
Destroys the DecayScore object and frees any allocated memory. | |
![]() | |
void | set_start (int v) |
Set the start index of the decay range. | |
size_t | get_start (DecayCurve *d=nullptr) const |
Get the start index of the decay range. | |
void | set_stop (int v) |
Set the stop index of the decay range. | |
size_t | get_stop (DecayCurve *d=nullptr) const |
Get the stop index of the decay range. | |
void | set_range (std::vector< int > v) |
Set the range using a vector of indices. | |
std::vector< int > | get_range (DecayCurve *d=nullptr) |
Get the range as a vector of indices. | |
void | set (int start=0, int stop=-1) |
Set the start and stop indices of the decay range. | |
DecayRange (int start, int stop) | |
Constructor. | |
virtual | ~DecayRange ()=default |
Destructor. | |
Class for scoring model fluorescence decay.
This class provides functionality for scoring the fluorescence decay of a model against experimental data. It calculates the score based on various scoring types, such as Poisson, Pearson, Gauss, CNP, and SSWR (Sum of Weighted Squared Residuals). The score can be calculated for a specific range of data points.
DecayScore::DecayScore | ( | DecayCurve * | model = nullptr , |
DecayCurve * | data = nullptr , |
||
std::string | score_type = "poisson" , |
||
int | start = 0 , |
||
int | stop = -1 |
||
) |
Constructs a DecayScore object with the specified model, experimental data, score type, and range of data points.
model | Pointer to the model decay curve |
data | Pointer to the experimental data decay curve |
score_type | Type of score to calculate (default: "poisson") |
start | Start index of the range of data points to consider (default: 0) |
stop | Stop index of the range of data points to consider (default: -1, i.e., all points) |
|
inlineoverride |
Destroys the DecayScore object and frees any allocated memory.
DecayCurve * DecayScore::get_data | ( | ) |
Get the experimental data decay curve.
DecayCurve * DecayScore::get_model | ( | ) |
Get the model decay curve.
double DecayScore::get_score | ( | int | start = 0 , |
int | stop = -1 , |
||
const char * | score_type = nullptr |
||
) |
Calculate the score based on the specified scoring type.
start | Start index of the range of data points to consider (default: 0) |
stop | Stop index of the range of data points to consider (default: -1, i.e., all points) |
score_type | Type of score to calculate (default: nullptr, i.e., use the current score type) |
std::string DecayScore::get_score_type | ( | ) |
Get the score type.
std::vector< double > & DecayScore::get_weighted_residuals | ( | ) |
Get the vector of weighted residuals.
double DecayScore::score | ( | DecayCurve * | model = nullptr | ) |
Evaluate and return the score.
model | Pointer to the model decay curve (default: nullptr, i.e., use the current model) |
void DecayScore::set | ( | DecayCurve * | model, |
DecayCurve * | data, | ||
std::string | score_type = "poisson" , |
||
int | start = 0 , |
||
int | stop = -1 |
||
) |
Set the model and experimental data decay curves, score type, and range of data points.
model | Pointer to the model decay curve |
data | Pointer to the experimental data decay curve |
score_type | Type of score to calculate (default: "poisson") |
start | Start index of the range of data points to consider (default: 0) |
stop | Stop index of the range of data points to consider (default: -1, i.e., all points) |
void DecayScore::set_data | ( | DecayCurve * | v | ) |
Set the experimental data decay curve.
v | Pointer to the experimental data decay curve |
void DecayScore::set_model | ( | DecayCurve * | v | ) |
Set the model decay curve.
v | Pointer to the model decay curve |
void DecayScore::set_score_type | ( | std::string | v | ) |
Set the score type.
v | The score type to set |