Skip to content

Instantly share code, notes, and snippets.

View JerryZhong's full-sized avatar

JerryZhong JerryZhong

  • Funshion
  • Haidian,Beijing
View GitHub Profile
def sigmoid(X):
'''Compute the sigmoid function '''
#d = zeros(shape=(X.shape))
den = 1.0 + e ** (-1.0 * X)
d = 1.0 / den
return d
# Back-Propagation Neural Networks
# another way: solve it as a Regression Problem
# Written in Python. See http://www.python.org/
# Modified by JSun to solve the problem here: http://www.weibo.com/1497035431/ynPEvC78V
# Neil Schemenauer <[email protected]>
import math
import random
import string