การประเมินประสิทธิภาพ

การติดตามตรวจสอบ Machine Learning ด้วย Python

Hakim Elakhrass

Co-founder and CEO of NannyML

อัลกอริทึม

  • CBPE - การประเมินประสิทธิภาพโดยอิงจากค่าความเชื่อมั่น
  • DLE - การประเมินการสูญเสียโดยตรง
การติดตามตรวจสอบ Machine Learning ด้วย Python

Direct loss estimation

  • ใช้สำหรับงาน regression
  • ประเมิน loss function ของโมเดลที่ถูกติดตาม
  • ใช้ LGBM เป็นโมเดล "เพิ่มเติม"
  • NannyML รองรับ regression metrics หลายรูปแบบ เช่น MAE, MSE หรือ RMSE

 

ภาพแสดงการทำงานของอัลกอริทึม DLE โดยข้อมูล production จะถูกส่งเข้าสู่อัลกอริทึม จากนั้นสร้าง analysis set จากการทำนายและข้อมูล production แล้วส่งต่อไปยังโมเดลเพิ่มเติมเพื่อทำนายประสิทธิภาพ

การติดตามตรวจสอบ Machine Learning ด้วย Python

DLE - การนำไปใช้ในโค้ด

# Initialize the DLE algorithm
estimator = nannyml.DLE(
    y_true='target',
    y_pred='y_pred',
    metrics=['rmse'],
    timestamp_column_name='timestamp',
    chunk_period='d'
    feature_column_names=features,
    tune_hyperparameters=False
)
# Fit the algorithm
estimator.fit(reference)
results = estimator.estimate(analysis)
การติดตามตรวจสอบ Machine Learning ด้วย Python

Confidence based performance estimation

  • ใช้สำหรับปัญหา binary และ multiclass classification

  • ใช้ค่าความเชื่อมั่นเพื่อประเมิน confusion matrix

  • ประเมิน classification performance metric ได้ทุกรูปแบบ

 

ภาพแสดงการทำงานของอัลกอริทึม CBPE โดยส่ง analysis set เข้าสู่อัลกอริทึม CBPE เพื่อทำนาย confusion matrix จากนั้นคำนวณ classification metrics อื่น ๆ จาก confusion matrix

การติดตามตรวจสอบ Machine Learning ด้วย Python

CBPE - การนำไปใช้ในโค้ด

# Initialize the CBPE algorithm
estimator = nannyml.CBPE(
    y_pred_proba='y_pred_proba',
    y_pred='y_pred',
    y_true='targets',
    timestamp_column_name='timestamp',
    metrics=['roc_auc'],
    chunk_period='d',
    problem_type='classification_binary',
)
# Fit the algorithm
estimator.fit(reference)
results = estimator.estimate(analysis)
การติดตามตรวจสอบ Machine Learning ด้วย Python

ผลลัพธ์

results.plot().show()

กราฟแสดงค่า RMSE ที่ประเมินได้ตามช่วงเวลา

การติดตามตรวจสอบ Machine Learning ด้วย Python

มาฝึกกันเถอะ!

การติดตามตรวจสอบ Machine Learning ด้วย Python

Preparing Video For Download...