IMP Reference Guide
develop.d97d4ead1f,2024/11/21
The Integrative Modeling Platform
|
Class for scoring model fluorescence decay. More...
#include <IMP/bff/DecayScore.h>
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.
Definition at line 34 of file DecayScore.h.
Public Member Functions | |
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. More... | |
~DecayScore () override | |
Destroys the DecayScore object and frees any allocated memory. More... | |
DecayCurve * | get_data () |
DecayCurve * | get_model () |
double | get_score (int start=0, int stop=-1, const char *score_type=nullptr) |
std::string | get_score_type () |
std::vector< double > & | get_weighted_residuals () |
double | score (DecayCurve *model=nullptr) |
void | set (DecayCurve *model, DecayCurve *data, std::string score_type="poisson", int start=0, int stop=-1) |
void | set_data (DecayCurve *v) |
void | set_model (DecayCurve *v) |
void | set_score_type (std::string v) |
Public Member Functions inherited from IMP::bff::DecayRange | |
DecayRange (int start, int stop) | |
Constructor. More... | |
virtual | ~DecayRange ()=default |
Destructor. More... | |
std::vector< int > | get_range (DecayCurve *d=nullptr) |
Get the range as a vector of indices. More... | |
size_t | get_start (DecayCurve *d=nullptr) const |
Get the start index of the decay range. More... | |
size_t | get_stop (DecayCurve *d=nullptr) const |
Get the stop index of the decay range. More... | |
void | set (int start=0, int stop=-1) |
Set the start and stop indices of the decay range. More... | |
void | set_range (std::vector< int > v) |
Set the range using a vector of indices. More... | |
void | set_start (int v) |
Set the start index of the decay range. More... | |
void | set_stop (int v) |
Set the stop index of the decay range. More... | |
void | show (std::ostream &out=std::cout) const |
IMP::bff::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) |
|
override |
Destroys the DecayScore object and frees any allocated memory.
Definition at line 134 of file DecayScore.h.
DecayCurve* IMP::bff::DecayScore::get_data | ( | ) |
Get the experimental data decay curve.
DecayCurve* IMP::bff::DecayScore::get_model | ( | ) |
Get the model decay curve.
double IMP::bff::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 IMP::bff::DecayScore::get_score_type | ( | ) |
Get the score type.
std::vector<double>& IMP::bff::DecayScore::get_weighted_residuals | ( | ) |
Get the vector of weighted residuals.
double IMP::bff::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 IMP::bff::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 IMP::bff::DecayScore::set_data | ( | DecayCurve * | v | ) |
Set the experimental data decay curve.
v | Pointer to the experimental data decay curve |
void IMP::bff::DecayScore::set_model | ( | DecayCurve * | v | ) |
Set the model decay curve.
v | Pointer to the model decay curve |
void IMP::bff::DecayScore::set_score_type | ( | std::string | v | ) |
Set the score type.
v | The score type to set |