توقع الانحدار اللوجستي — تحدي 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حل هذا التحدي يرتبط بفتح دورة «تعلم الآلة» بحسابك.
ابدأ الحل