|
virtual int | init (map< string, string > &mapper) |
|
virtual int | Learn (const MedSamples &samples) |
|
virtual int | Learn (const vector< MedSample > &samples) |
|
virtual int | Learn (const vector< MedSample > &samples, const int samples_time_unit) |
|
virtual int | Apply (MedSamples &samples) |
|
virtual int | Apply (vector< MedSample > &samples) |
|
void | Apply (const vector< float > &preds, vector< float > &probs) const |
|
float | Apply (float pred) const |
|
void | get_input_fields (vector< Effected_Field > &fields) const |
| List of fields that are used by this post_processor.
|
|
void | get_output_fields (vector< Effected_Field > &fields) const |
| List of fields that are being effected by this post_processor.
|
|
void | Learn (const MedFeatures &matrix) |
|
void | Apply (MedFeatures &matrix) |
|
calibration_entry | calibrate_pred (float pred) |
|
float | calibrate_pred (float pred, int type) const |
|
void | write_calibration_table (const string &calibration_table_file) |
|
void | read_calibration_table (const string &fname) |
|
void | dprint (const string &pref) const |
|
void | learn_isotonic_regression (const vector< float > &x, const vector< float > &y, const vector< float > &weights, vector< float > &min_range, vector< float > &max_range, vector< float > &map_prob, int n_top_controls, int n_bottom_cases, bool verbose) |
|
ADD_SERIALIZATION_FUNCS(calibration_type, estimator_type, binning_method, bins_num, time_unit, pos_sample_min_time_before_case, pos_sample_max_time_before_case, km_time_resolution, min_cases_for_calibration_smoothing_pct, do_calibration_smoothing, censor_controls, min_preds_in_bin, min_score_res, min_prob_res, fix_pred_order, poly_rank, control_weight_down_sample, cals, min_range, max_range, map_prob, platt_params, use_isotonic, n_top_controls, n_bottom_cases) protected void | smooth_calibration_entries (const vector< calibration_entry > &cals, vector< calibration_entry > &smooth_cals, double controls_factor) |
|
virtual void | init_post_processor (MedModel &mdl) |
|
void * | new_polymorphic (string dname) |
| for polymorphic classes that want to be able to serialize/deserialize a pointer * to the derived class given its type one needs to implement this function to return a new to the derived class given its type (as in my_type)
|
|
virtual float | get_use_p () |
|
virtual int | get_use_split () |
|
virtual int | version () const |
| Relevant for serializations.
|
|
virtual string | my_class_name () const |
| For better handling of serializations it is highly recommended that each SerializableObject inheriting class will implement the next method.
|
|
virtual void | serialized_fields_name (vector< string > &field_names) const |
| The names of the serialized fields.
|
|
virtual void | pre_serialization () |
|
virtual void | post_deserialization () |
|
virtual size_t | get_size () |
| Gets bytes sizes for serializations.
|
|
virtual size_t | serialize (unsigned char *blob) |
| Serialiazing object to blob memory. return number ob bytes wrote to memory.
|
|
virtual size_t | deserialize (unsigned char *blob) |
| Deserialiazing blob to object. returns number of bytes read.
|
|
size_t | serialize_vec (vector< unsigned char > &blob) |
|
size_t | deserialize_vec (vector< unsigned char > &blob) |
|
virtual size_t | serialize (vector< unsigned char > &blob) |
|
virtual size_t | deserialize (vector< unsigned char > &blob) |
|
virtual int | read_from_file (const string &fname) |
| read and deserialize model
|
|
virtual int | write_to_file (const string &fname) |
| serialize model and write to file
|
|
virtual int | read_from_file_unsafe (const string &fname) |
| read and deserialize model without checking version number - unsafe read
|
|
int | init_from_string (string init_string) |
| Init from string.
|
|
int | init_params_from_file (string init_file) |
|
int | init_param_from_file (string file_str, string ¶m) |
|
int | update_from_string (const string &init_string) |
|
virtual int | update (map< string, string > &map) |
| Virtual to update object from parsed fields.
|
|
virtual string | object_json () const |
|
|
CalibrationTypes | calibration_type = probability_time_window |
|
int | time_unit = MedTime::Days |
|
string | estimator_type = "kaplan_meier" |
|
string | binning_method = "equal_num_of_samples_per_bin" |
|
int | bins_num = 1000 |
|
int | pos_sample_min_time_before_case = 0 |
|
int | pos_sample_max_time_before_case = 360 |
|
int | km_time_resolution = 1 |
|
int | min_cases_for_calibration_smoothing_pct = 10 |
|
int | do_calibration_smoothing = 1 |
|
int | censor_controls = 0 |
| censor controls without long-enough followup even in mean-outcome mode
|
|
string | weights_attr_name = "weight" |
|
int | min_control_bins = -1 |
|
bool | use_isotonic = false |
| If true will use isotonic on time_window.
|
|
int | min_preds_in_bin = 100 |
| minimal number of obseravtion to create bin
|
|
float | min_score_res = 0 |
| score resulotion value to round to and merge similar
|
|
float | min_prob_res = 0 |
| final probality resulotion value to round to and merge similar
|
|
bool | fix_pred_order = false |
| If true will not allow higher scores to have lower probabilites.
|
|
int | poly_rank = 1 |
| Only in platt_scale - the polynon rank for optimizing sigmoid of prob.
|
|
double | control_weight_down_sample = 1 |
| factor weight for controls when downsampling controls by this factor
|
|
bool | verbose = true |
| If true will print verbose information for calibration.
|
|
int | n_top_controls = 0 |
| number of controls to add with maximal-score for regularization of isotonic regression
|
|
int | n_bottom_cases = 0 |
| number of cases to add with minimal-score for regularization of isotonic regression
|
|
vector< calibration_entry > | cals |
| for "time_window"
|
|
vector< float > | min_range |
|
vector< float > | max_range |
|
vector< float > | map_prob |
| for "binning/isotonic-regression"
|
|
vector< double > | platt_params |
| for "platt_scale"
|
|
PostProcessorTypes | processor_type = PostProcessorTypes::FTR_POSTPROCESS_LAST |
|
int | use_split = -1 |
|
float | use_p = 0.0 |
|