lightgbm
This commit is contained in:
@@ -109,7 +109,7 @@ def predict(
|
||||
# feature vector 생성
|
||||
# =====================================================
|
||||
|
||||
row = []
|
||||
results = []
|
||||
|
||||
for target in targets:
|
||||
row = []
|
||||
@@ -124,12 +124,13 @@ def predict(
|
||||
|
||||
pred = model.predict(X)[0]
|
||||
|
||||
diff = target.get("difficulty", "unknown")
|
||||
results.append({
|
||||
"songno": str(songno),
|
||||
"diff": target.get("difficulty", "unknown"),
|
||||
"predicted": round(float(pred), 4)
|
||||
})
|
||||
|
||||
print(
|
||||
f"{diff:10} "
|
||||
f"{pred:.1f}"
|
||||
)
|
||||
print(json.dumps(results, indent=2, ensure_ascii=False))
|
||||
|
||||
|
||||
# =========================================================
|
||||
|
||||
Reference in New Issue
Block a user