#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from __future__ import print_function
from functools import reduce
class VectorOp(object):
@staticmethod
def dot(x, y):
return reduce(lambda a, b: a + b, VectorOp.element_multiply(x, y), 0.0)
@staticmethod
def element_multiply(x, y):
return list(map(lambda x_y: x_y[0] * x_y[1], zip(x, y)))
@staticmethod
def element_add(x, y)
实验3 sigmod函数
最新推荐文章于 2024-09-11 18:01:31 发布
本文介绍了如何使用Python编程实现Sigmod函数,详细讲解了其实现过程,并探讨了该函数在机器学习中的应用。
摘要由CSDN通过智能技术生成