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