Edit cost functions for chemical graphs such as the ones contained in the datasets Mutagenicity, AIDS, PAH, MAO, Alkane, and Acyclic.
More...
#include <chem_2.hpp>
|
| CHEM2 (double node_ins_del_cost=11, double edge_ins_del_cost=1.1, double alpha=0.25) |
| Constructor. More...
|
|
virtual double | node_ins_cost_fun (const UserNodeLabel &node_label) const final |
| Node insertions cost function. More...
|
|
virtual double | node_del_cost_fun (const UserNodeLabel &node_label) const final |
| Node deletion cost function. More...
|
|
virtual double | node_rel_cost_fun (const UserNodeLabel &node_label_1, const UserNodeLabel &node_label_2) const final |
| Node relabeling cost function. More...
|
|
virtual double | edge_ins_cost_fun (const UserEdgeLabel &edge_label) const final |
| Edge insertion cost function. More...
|
|
virtual double | edge_del_cost_fun (const UserEdgeLabel &edge_label) const final |
| Edge deletion cost function. More...
|
|
virtual double | edge_rel_cost_fun (const UserEdgeLabel &edge_label_1, const UserEdgeLabel &edge_label_2) const final |
| Edge relabeling cost function. More...
|
|
virtual | ~EditCosts ()=0 |
| Virtual destructor. More...
|
|
| EditCosts () |
| Constructor.
|
|
virtual void | vectorize_node_label (const UserNodeLabel &node_label, std::vector< double > &vector_representation) const |
| Computes a node label's representation as a real-valued vector. More...
|
|
virtual void | vectorize_edge_label (const UserEdgeLabel &edge_label, std::vector< double > &vector_representation) const |
| Computes an edge label's representation as a real-valued vector. More...
|
|
template<class UserNodeLabel, class UserEdgeLabel>
class ged::CHEM2< UserNodeLabel, UserEdgeLabel >
Edit cost functions for chemical graphs such as the ones contained in the datasets Mutagenicity, AIDS, PAH, MAO, Alkane, and Acyclic.
Cost function for graphs that represent chemical compounds. Nodes are expected to be attributed with a chemical symbol (named "chem"). Edges are expected to be attributed with their valence (named "valence"). The datasets pah, mao, alkane, and acyclic are part of GREYC's chemistry dataset which can be downloaded from https://brunl01.users.greyc.fr/CHEMISTRY/. The datasets Mutagenicity and AIDS are contained in the IAM graph database repository which can be downloaded from http://www.fki.inf.unibe.ch/databases/iam-graph-database:
Implements the edit costs suggested in:
Definition at line 54 of file chem_2.hpp.
◆ CHEM2()
template<class UserNodeLabel , class UserEdgeLabel >
ged::CHEM2< UserNodeLabel, UserEdgeLabel >::CHEM2 |
( |
double |
node_ins_del_cost = 11 , |
|
|
double |
edge_ins_del_cost = 1.1 , |
|
|
double |
alpha = 0.25 |
|
) |
| |
Constructor.
- Parameters
-
[in] | node_ins_del_cost | Cost for deleting or inserting nodes. |
[in] | edge_ins_del_cost | Cost for deleting or inserting edges. |
[in] | alpha | Importance of node edit operations vs. importance of edge edit operations. |
- Note
- Calling the constructor with the default arguments constructs the edit costs suggested in https://doi.org/10.1007/978-3-319-18224-7_14.
◆ edge_del_cost_fun()
template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::CHEM2< UserNodeLabel, UserEdgeLabel >::edge_del_cost_fun |
( |
const UserEdgeLabel & |
edge_label | ) |
const |
|
finalvirtual |
◆ edge_ins_cost_fun()
template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::CHEM2< UserNodeLabel, UserEdgeLabel >::edge_ins_cost_fun |
( |
const UserEdgeLabel & |
edge_label | ) |
const |
|
finalvirtual |
◆ edge_rel_cost_fun()
template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::CHEM2< UserNodeLabel, UserEdgeLabel >::edge_rel_cost_fun |
( |
const UserEdgeLabel & |
edge_label_1, |
|
|
const UserEdgeLabel & |
edge_label_2 |
|
) |
| const |
|
finalvirtual |
Edge relabeling cost function.
- Parameters
-
[in] | edge_label_1 | An edge label. |
[in] | edge_label_2 | An edge label. |
- Returns
- The cost of changing an edge's label from
edge_label_1
to edge_label_2
.
- Note
- Must be implemented by derived classes of ged::EditCosts.
Reimplemented from ged::EditCosts< UserNodeLabel, UserEdgeLabel >.
◆ node_del_cost_fun()
template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::CHEM2< UserNodeLabel, UserEdgeLabel >::node_del_cost_fun |
( |
const UserNodeLabel & |
node_label | ) |
const |
|
finalvirtual |
◆ node_ins_cost_fun()
template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::CHEM2< UserNodeLabel, UserEdgeLabel >::node_ins_cost_fun |
( |
const UserNodeLabel & |
node_label | ) |
const |
|
finalvirtual |
◆ node_rel_cost_fun()
template<class UserNodeLabel , class UserEdgeLabel >
virtual double ged::CHEM2< UserNodeLabel, UserEdgeLabel >::node_rel_cost_fun |
( |
const UserNodeLabel & |
node_label_1, |
|
|
const UserNodeLabel & |
node_label_2 |
|
) |
| const |
|
finalvirtual |
The documentation for this class was generated from the following file: