逻辑回归理论简介与手写实现
逻辑回归理论简介与手写实现。理论推导:代码部分:# -*- coding: utf-8 -*-"""Created on Sun Jun 28 11:42:11 2020@author: Lenovo"""import numpy as npdef sigmoid(x): z = 1 / (1 + np.exp(-x)) return zdef initialize_params(dims): W = np.zeros((dims, 1))
转载
2020-06-28 12:16:20 ·
241 阅读 ·
0 评论