LabeledTriples¶
- class LabeledTriples(data)[source]¶
Bases:
object
Labeled triples for drug pair scoring.
Attributes Summary
Methods Summary
Drop the duplicated entries.
Get the number of unique drug pairs in the labeled triples dataset.
Get the number of unique contexts in the labeled triples dataset.
Get the number of drugs in the labeled triples dataset.
Get the number of triples in the labeled triples dataset.
Get the number of negative triples in the dataset.
Get the ratio of positive triples in the dataset.
Get the number of positive triples in the dataset.
Get the ratio of positive triples in the dataset.
train_test_split
([train_size, random_state])Split the LabeledTriples object for training and testing.
Attributes Documentation
- dtype: ClassVar[Mapping[str, type]] = {'context': <class 'str'>, 'drug_1': <class 'str'>, 'drug_2': <class 'str'>, 'label': <class 'float'>}¶
Methods Documentation
- get_combination_count()[source]¶
Get the number of unique drug pairs in the labeled triples dataset.
- Return type
- get_context_count()[source]¶
Get the number of unique contexts in the labeled triples dataset.
- Return type
- get_labeled_triple_count()[source]¶
Get the number of triples in the labeled triples dataset.
- Return type