Example #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)
Example #2
0
 def accuracy(self, M):
     W = ndl.rw(self.data, M=M)
     A = self.activation(W)
     return np.mean(A.idxmax(1) == self.data['Outcomes'])
Example #3
0
 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'])
Example #4
0
def simulate(i):
    global data
    W = ndl.rw(data, M=1000000)
    return i, W
Example #5
0
def simulate(i):
    global data
    W = ndl.rw(data,M=1000000)
    return i,W