code stringlengths 3 6.57k |
|---|
os.mkdir(path) |
recordings (<= ptc15) |
enumerate(dsprecs) |
len(dsprecs) |
len(dsprecs) |
os.path.join(path, textheaderfname) |
open(fullfname, 'w') |
f.write(textheader) |
print(fullfname) |
exportall(self, basepath, sortpath) |
self.exportptcsfiles(basepath, sortpath) |
self.exportdin(basepath) |
self.exporttextheader(basepath) |
exportspikewaves(self, sids, selchans, tis, fname, format) |
len(sids) |
self.get_common_chans(sids, selchans) |
len(chans) |
np.zeros((nspikes, nchans, nt) |
enumerate(sids) |
spikechans.searchsorted(chans) |
stream.probe.siteloc_arr() |
stream.converter.AD2uV(1) |
open(fname, 'wb') |
np.savetxt(fname, data, fmt='%d', delimiter=',') |
ValueError('Unknown format: %r' % format) |
list(chans) |
list(tis) |
list(spikes.dtype.fields) |
dim.startswith('c') |
isdigit() |
np.any([ dim == 'RMSerror' for dim in dims ]) |
len(comps) |
self.get_rms_error(sids, tis=tis, chans=selchans) |
data.append( np.float32(spikes[dim][sids]) |
dim.startswith('c') |
isdigit() |
int(lstrip(dim, 'c') |
data.append( np.float32(X[:, compid]) |
data.append( np.float32(rms) |
RuntimeError('Unknown dim %r' % dim) |
np.column_stack(data) |
zip(dims, data.T) |
d.mean() |
std() |
d.max() |
d.min() |
d.std() |
d.std() |
np.asarray([0, nt]) |
print('tis: %r' % (tis,) |
self.get_common_chans(sids, chans) |
len(chans) |
len(sids) |
RuntimeError("Need at least 2 spikes for %s" % kind) |
RuntimeError("Spikes have no common chans for %s" % kind) |
calculated (cache hit) |
self.get_Xhash(kind, sids, tis, chans, self.npcsperchan, norm) |
list(tis) |
list(chans) |
print('Cache miss, (re) |
list(tis) |
list(chans) |
np.zeros((nspikes, nchans, nt) |
enumerate(sids) |
spikechans.searchsorted(chans) |
spikedata.ptp(axis=1) |
max() |
print('Input shape for %s: %r' % (kind, data.shape) |
time.time() |
print('Reshaped input for %s: %r' % (kind, data.shape) |
mdp.pca(data, output_dim=5, svd=False) |
PCA(n_components=5) |
pca.fit_transform(data) |
ValueError('Invalid PCALIB %r' % PCALIB) |
RuntimeError("Can't satisfy minncomp=%d request" % minncomp) |
mp.cpu_count() |
SparsePCA(n_components=n_components, alpha=alpha, n_jobs=n_jobs) |
spca.fit_transform(data) |
mp.cpu_count() |
MiniBatchSparsePCA(n_components=n_components, alpha=alpha, n_jobs=n_jobs) |
mbspca.fit_transform(data) |
NMF(n_components=n_components, init=init) |
nmf.fit_transform(data) |
min((self.npcsperchan*nchans, data.shape[1]) |
print('ncomp: %d' % ncomp) |
mdp.pca(data, output_dim=ncomp) |
TSNE(n_components=n_components) |
tsne.fit_transform(data) |
intround(np.sqrt(nspikes) |
RuntimeError("Can't satisfy minncomp=%d request" % minncomp) |
RuntimeError('Need more observations than dimensions for ICA') |
min((self.npcsperchan*nchans, maxncomp, data.shape[1]) |
print('ncomp: %d' % ncomp) |
mdp.pca(data, output_dim=ncomp) |
mdp.nodes.FastICANode(g='pow3') |
node(data) |
node.get_projmatrix() |
np.any(pm, axis=0) |
True (default) |
algorithm (parallel, deflation) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.