random-forest/star.py
Vylion 9946ca10f9 📻 Added parallelization to best question search
🚧 Created new tree to enable bootstrapping with indices (to avoid making a whole new bootstrapped database per tree)
2019-04-24 05:04:39 +02:00

16 lines
538 B
Python

class Star(object):
def __init__(self, label, display_name, data, fields):
self.label = label
self.name = display_name
data_list = []
for field in fields:
data_list.append(data[field])
self.data = data_list
def __str__(self):
if len(self.label) > 1:
classification = ' or '.join(self.label)
else:
classification = self.label
return ("Star {} {} of spectral type {}"
.format(self.name, self.data, classification))