示例#1
0
def main():

    data = pd.read_csv('lexample.csv')
    W0 = ndl.ndl(data)
    diff = np.zeros_like(W0)
    for i in xrange(10):
        W = ndl.rw(data, M=10000)
        diff += abs(W - W0)
    diff = diff / 10.
    print diff.max(), diff.min(), np.mean(diff)
示例#2
0
文件: sim.py 项目: cyrus/learning
 def accuracy(self, M):
     W = ndl.rw(self.data, M=M)
     A = self.activation(W)
     return np.mean(A.idxmax(1) == self.data['Outcomes'])
示例#3
0
文件: sim.py 项目: rmalouf/learning
 def accuracy(self,M):
     W = ndl.rw(self.data, distribution=self.distribution, M=M)
     A = self.activation(W)
     return np.mean(A.idxmax(1) == self.data['Outcomes'])
示例#4
0
def simulate(i):
    global data
    W = ndl.rw(data, M=1000000)
    return i, W
示例#5
0
def simulate(i):
    global data
    W = ndl.rw(data,M=1000000)
    return i,W