LRSolver.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Steal-ML 作者: ftramer 项目源码 文件源码
def predict(self, x):
        _x = np.ones((x.shape[0], x.shape[1] + 1))
        _x[:, : - 1] = x
        score = expit(np.inner(self.w, _x))
        signs = np.sign(score - .5)
        return [0 if x == -1 else 1 for x in signs]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号