Kodax

توقع الانحدار اللوجستي — تحدي Python

اكتب predict_proba(weights, bias, x) تحسب sigmoid(w·x + b) مقربة لثلاثة أرقام، وpredict(weights, bias, x) تُرجع 1 إذا كان الاحتمال ≥ 0.5 وإلا 0.

import math


def predict_proba(weights, bias, x):
    pass


def predict(weights, bias, x):
    pass

حل هذا التحدي يرتبط بفتح دورة «تعلم الآلة» بحسابك.

ابدأ الحل