GitXplorerGitXplorer
m

deepsort

public
6 stars
2 forks
0 issues

Commits

List of commits on branch master.
Verified
e23747ee4b23001abbf8660a126ef2882bcd83ec

Added details to README

mmayank26saxena committed 7 years ago
Unverified
ad4af985312ddd6c948f762246b7bb11b43ad46f

added test-deepsort ipynb

mmayank26saxena committed 7 years ago
Verified
55727e7023b443054f5ea9016ff8a3ae61b7b08a

Update README.md

mmayank26saxena committed 7 years ago
Verified
052d39b916299b3d01eb70145f0d99c88ba7c129

Create LICENSE

mmayank26saxena committed 7 years ago
Unverified
1ec9fa8d28b84c740c6c943b1962798846084abe

renamed file

mmayank26saxena committed 7 years ago
Unverified
b6cbb638600b2705c8282af8e2854e342b8d03dc

98% accuracy

mmayank26saxena committed 7 years ago

README

The README file for this repository.

Deepsort

A recurrent neural network based sorting algorithm.

How it works?

RNNs can compute any arbitrary function, given finite resources since they are "Turing Complete" machines. I have used a sequence to sequence (seq2seq) based neural network model. I have chosen this model since, both the input and output are sequences. Input being unsorted sequence of integers and the output being the sorted sequence of integers.

I achieved 99.5% accuracy after 50,000 epochs.

Results

For the purpose of evaluating the performance (in terms of correct predictions) of this algorithm, I have considered that the input sequence will be of length = 15 and that the maximum number in this sequence will be <= 100. The success rate is evaluated as (number of correct predictions)/(number of trials).

Number of Trials Success Rate
100 97%
1000 96%
10000 95%

Screenshots

Below is an example of sorting using deepsort - alt text

To Do

  • [ ] Try with different sequence lengths and max number.
  • [ ] Add plots.
  • [ ] Compare average running time with other sorting algorithms.

Contributions

All patches are welcome!

License

MIT License - see the LICENSE file for details.

Credits

  1. https://github.com/keras-team/keras/blob/master/examples/addition_rnn.py
  2. http://shashank-gupta.com/2016/07/22/learning-to-sort-using-seq2seq/