Skip to content

Commit

Permalink
add images to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ferchaure authored Apr 16, 2023
1 parent 7a3ef38 commit 09c0349
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,30 @@ gt = [cl1,cl2,cl3,cl4]

#plot clusters
plt.figure()

for cl in gt:
plt.plot(*cl.T,marker='.',linestyle='',markersize=3)
plt.title('Ground Truth')
plt.grid()
plt.show()
```
![output_gt](https://user-images.githubusercontent.com/5598671/232350354-fb3d24ea-1e18-45f7-90e7-1ccddd4e2d82.png)


#run the algorithm. The fit method applied the cluster selection described in Waveclus 3. The method fit_WC1 is the alternative using the original Waveclus 1 temperature selection.
```
#run the algorithm. The fit method applied the cluster selection described in Waveclus 3.
#The method fit_WC1 is the alternative using the original Waveclus 1 temperature selection.
data = np.concatenate(gt)
clustering = SPC(mintemp=0,maxtemp=0.2)
labels, metadata = clustering.fit(data,min_clus=150,return_metadata=True)
#It is posible to show a temperature map using the optional output metadata
plot_temperature_plot(metadata)
plt.show()
```

![temp_map](https://user-images.githubusercontent.com/5598671/232350373-855254b9-fa42-4ba3-aa8c-b110aeefa53e.png)

```
#To show the assigned labels:
plt.figure()
for c in np.unique(labels):
Expand All @@ -58,6 +66,8 @@ plt.title('Results')
plt.show()
```

![output_results](https://user-images.githubusercontent.com/5598671/232350380-19bc5d10-7e52-443c-83d3-5a9f7ba6090e.png)

## Limitations and Changes

- It runs with a data matrix [npoints, ndims] as input. Running the clustering from a distance matrix is not implemented.
Expand Down Expand Up @@ -119,4 +129,4 @@ Chaure FJ, Rey HG, Quian Quiroga R. A novel and fully automatic spike sorting im
pmid = {29995603},
keywords = {neurophysiology, single-neuron recordings, spike sorting, tetrode}
}
```
```

0 comments on commit 09c0349

Please sign in to comment.