get_labeled_entries and get_unlabeled_entries are confusing to me. The latter one returns the entry index while get_labeled_entries doesn't. I would be great if get_labeled_entries had the option to return the index.
It's about this piece of code:
def get_labeled_entries(self):
"""
Returns list of labeled feature and their label
Returns
-------
labeled_entries : list of (feature, label) tuple
Labeled entries
"""
return list(filter(lambda entry: entry[1] is not None, self.data))
def get_unlabeled_entries(self):
"""
Returns list of unlabeled features, along with their entry_ids
Returns
-------
unlabeled_entries : list of (entry_id, feature) tuple
Labeled entries
"""
return [
(idx, entry[0]) for idx, entry in enumerate(self.data)
if entry[1] is None
]
get_labeled_entries
andget_unlabeled_entries
are confusing to me. The latter one returns the entry index whileget_labeled_entries
doesn't. I would be great ifget_labeled_entries
had the option to return the index.It's about this piece of code:
Thanks a lot for this lib. It's very useful.