MCPcopy Create free account
hub / github.com/comaps/comaps / load_binary_list

Function load_binary_list

tools/python/booking_hotels_quality.py:23–31  ·  view source on GitHub ↗

Loads reference binary classifier output.

(path)

Source from the content-addressed store, hash-verified

21
22
23def load_binary_list(path):
24 """Loads reference binary classifier output. """
25 bits = []
26 with open(path, 'r') as fd:
27 for line in fd:
28 if (not line.strip()) or line.startswith('#'):
29 continue
30 bits.append(1 if line.startswith('y') else 0)
31 return bits
32
33
34def load_score_list(path):

Callers 1

mainFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected