예제 #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