31 lines
731 B
Python
31 lines
731 B
Python
class TargetLabeler:
|
|
|
|
def label(self, score):
|
|
|
|
labels = []
|
|
|
|
# -----------------------------
|
|
# THERMAL
|
|
# -----------------------------
|
|
if score["thermal"] > 80:
|
|
labels.append("HOT")
|
|
elif score["thermal"] < 60:
|
|
labels.append("COOL")
|
|
|
|
# -----------------------------
|
|
# COST
|
|
# -----------------------------
|
|
if score["cost"] > 100:
|
|
labels.append("EXPENSIVE")
|
|
|
|
# -----------------------------
|
|
# STABILITY
|
|
# -----------------------------
|
|
if score["instability"] > 5:
|
|
labels.append("UNSTABLE")
|
|
|
|
if not labels:
|
|
labels.append("SAFE")
|
|
|
|
return labels
|