27 #ifndef SRC_METHODS_BIPARTITE_ML_HPP_ 28 #define SRC_METHODS_BIPARTITE_ML_HPP_ 50 template<
class UserNodeLabel,
class UserEdgeLabel>
61 typedef Eigen::Array<double, 1, Eigen::Dynamic> RowVector_;
63 typedef Eigen::Array<double, Eigen::Dynamic, 1> ColumnVector_;
71 void init(
const Eigen::ArrayXXd & substitution_matrix);
73 void add_features_(
const Eigen::ArrayXXd & matrix, std::size_t row, std::size_t col, std::vector<double> & feature_vector)
const;
83 RowVector_ deviations_;
87 RowVector_ intervals_;
96 void init(
const Eigen::ArrayXXd & substitution_matrix);
98 void add_features_(
const Eigen::ArrayXXd & matrix, std::size_t row, std::size_t col, std::vector<double> & feature_vector)
const;
102 ColumnVector_ maxima_;
104 ColumnVector_ minima_;
106 ColumnVector_ means_;
108 ColumnVector_ deviations_;
110 ColumnVector_ leaders_;
112 ColumnVector_ intervals_;
117 std::string lsape_method_options_;
119 Eigen::ArrayXXd lsape_instance_;
121 std::vector<double> global_features_;
123 RowFeatures_ row_features_;
125 ColFeatures_ col_features_;
133 virtual bool ml_parse_option_(
const std::string & option,
const std::string & arg)
final;
149 void populate_lsape_instance_(
const GEDGraph & g,
const GEDGraph & h, std::size_t num_threads);
151 void compute_global_features_(
const Eigen::ArrayXXd & substitution_matrix);
153 void add_global_features_(std::vector<double> & feature_vector)
const;
155 void add_cell_features_(std::size_t row, std::size_t col,
double node_cost, std::vector<double> & feature_vector)
const;
Contains the standardized input data along with basic functionality.
virtual std::size_t ml_get_num_features_() final
Returns the number of features.
Uses characteristics of an LSAPE instance for defining feature vectors for node edit operations...
virtual void ml_set_default_options_() final
Sets all options that are not among the ones shared by all derived classes of ged::MLBasedMethod to d...
virtual void ml_populate_insertion_feature_vector_(const GEDGraph &h, GEDGraph::NodeID k, std::vector< double > &feature_vector) final
Computes insertion feature vector.
virtual void ml_init_() final
Initializes the method after initializing the global variables for the graphs.
Abstract class for methods that use lossy transformations to LSAPE for approximating the graph edit d...
The normalized input graphs used by GEDLIB. All labels are integers.
virtual void ml_populate_substitution_feature_vector_(const GEDGraph &g, const GEDGraph &h, GEDGraph::NodeID i, GEDGraph::NodeID k, std::vector< double > &feature_vector) final
Computes substitution feature vector.
virtual bool ml_parse_option_(const std::string &option, const std::string &arg) final
Parses one option that is not among the ones shared by all derived classes of ged::MLBasedMethod.
Global namespace for GEDLIB.
virtual void ml_populate_deletion_feature_vector_(const GEDGraph &g, GEDGraph::NodeID i, std::vector< double > &feature_vector) final
Computes deletion feature vector.
Abstract class for methods that transform GED to LSAPE by using a SVM or a DNN to predict the cost of...
virtual void ml_init_feature_variables_(const GEDGraph &g, const GEDGraph &h, std::size_t num_threads) final
Initializes variables that are used for populating the feature vectors of assignments between two inp...
void init()
Initializes the method with options specified by set_options().
std::size_t NodeID
Internally used vertex ID type.
virtual std::string ml_valid_options_string_() const final
Returns string of all valid options that are not among the ones shared by all derived classes of ged:...