* Added dbscan in two formats. A jupyter notebook file for the
storytelling and a .py file for people that just want to look at the
code. The code in both is essentially the same. With a few things
different in the .py file for plotting the clusters.
* fixed LGTM problems
* Some requested changes implemented.
Still need to do docstring
* implememted all changes as requested
* Min head with decrease key functionality
* doctest added
* __str__ changed as per Python convention
* edits in doctest
* get_value by key added
* __getitem__ added
* Add disjoint set
* disjoint set: add doctest, make code more Pythonic
* disjoint set: replace x.p with x.parent
* disjoint set: add test and refercence
* fix: Syntax Error lgtm display in matrix/matrix_operation.py.
* Testing for None should use the 'is' operator.
* fix: Too many arguments for string format.
* fix: supress lgtm alert as false positive.
* style: Unnecessary 'pass' statement.
* Revert "fix: Syntax Error lgtm display in matrix/matrix_operation.py."
This reverts commit 4c629b4ce1.
* Add Kth lexicographic permutation
Function that computes the kth lexicographic permtation of 0,1,2,...,n-1 in O(n^2) time
* Update kth_lexicographic_permutation.py
Addressed requested changes
* Added OOP aproach to matrices
* created methods for minors, cofactors, and determinants and added corresponding doctests
* Added methods for adjugate, inverse, and identity (along with corresponding doctests) to matrix_class.py
A small bug persists that causes the doctest to fail.
After a couple Matrix objects are printed, the next one is printed in a different format.
* formatted matrix_class.py with python/black
* implemented negation and exponentiation as well as corresponding doctests in matrix_class.py. Also implemented eq and ne comparison operations
* changed __str__ method in matrix_class.py to align with numpy standard and fixed bug in cofactors method
* removed property decorators from several methods in matrix_class.py
* Add radix2 FFT
Created a dynamic implementation of the radix - 2 Fast Fourier Transform for fast polynomial multiplication.
Reference: https://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm#The_radix-2_DIT_case
* Rename radix2_FFT.py to radix2_fft.py
* Update radix2_fft printing
Improved the printing method with f.prefix and String.join()
* __str__ method update
* Turned the tests into doctests
* Binomial Heap
Implementation of Binomial Heap. Reference: Advanced Data Structures, Peter Brass
* Update binomial_heap.py
* Update binomial_heap.py
* Update binomial_heap.py
- Fuller documentation of binomial heap
- Update unit tests
- Replace printing method by overwriting __str__()
* Update binomial_heap.py
- Added more tests
- Added to the documentation
- Stylistic editing
- mergeHeaps now also returns a reference to the merged heap
- added a preOrder function that returns a list with the preorder of the heap
* Update binomial_heap.py
Changed the unit tests structure
* Turned the tests into doctests
* Created Sherman Morrison
* Added docstring for class
* Updated Sherman morrison
1. Added docstring tests
2. Tweaked __str__() using join
3. Added __repr__()
4. Changed index validation to be independent method
* Applied cclauss's point
1. Reduced line length for __str__()
2. Removed parens for assert
* svm.py
for issue #840
I would like to add the Support Vector Machine algorithm implemented in Python 3.6.7
Requirements:
- sklearn
* update svm.py
* update svm.py
* Update and renamed to sorted_vector_machines.py
* Updated sorted_vector_machines.py
* Added print function into matrix_multiplication_addition.py and removed blank space in data_structures/binary tree directory
* Removed .vs/ folder per #893
* Rename matrix_multiplication_addition.py to matrix_operation.py
* Fixing lgtm issue in basic_graphs per ##1024
* Fixed lgtm issue per @cclauss recommendation in #1024
* function for the knapsack problem which returns one of the optimal subsets
* function for the knapsack problem which returns one of the optimal subsets
* function for the knapsack problem which returns one of the optimal subsets
* function for the knapsack problem which returns one of the optimal subsets
* function for the knapsack problem which returns one of the optimal subsets
* some pep8 cleanup too
* ENH: refactored longest common subsequence, also fixed a bug with the sequence returned
* renamed function
* function for the knapsack problem which returns one of the optimal subsets
* function for the knapsack problem which returns one of the optimal subsets
* function for the knapsack problem which returns one of the optimal subsets
* function for the knapsack problem which returns one of the optimal subsets
* function for the knapsack problem which returns one of the optimal subsets
* some pep8 cleanup too
* divide and conquer and brute force algorithms for array-inversions counting
* divide and conquer and brute force algorithms for array-inversions counting
* divide and conquer and brute force algorithms for array-inversions counting
* a naive and divide-and-conquer algorithms for the convex-hull problem
* two convex-hull algorithms, a divide-and-conquer and a naive algorithm
* two convex-hull algorithms, a divide-and-conquer and a naive algorithm
* two convex-hull algorithms, a divide-and-conquer and a naive algorithm
* divide and conquer and brute force algorithms for array-inversions counting
* divide and conquer and brute force algorithms for array-inversions counting
* divide and conquer and brute force algorithms for array-inversions counting
* Added new algorithm which takes points as an input and outputs a polynom connecting them
* Rename Python-Polynom-for-points.py to python-polynom-for-points.py
* Update python-polynom-for-points.py
* Update python-polynom-for-points.py
* Update python-polynom-for-points.py
* Update python-polynom-for-points.py
* Update python-polynom-for-points.py
* Update python-polynom-for-points.py
* Update python-polynom-for-points.py
* Add doctests and run thru psf/black
* Travis CI: Add pytest --doctest-modules neural_network
Fixes#987
```
neural_network/perceptron.py:123: in <module>
sample.insert(i, float(input('value: ')))
../lib/python3.7/site-packages/_pytest/capture.py:693: in read
raise IOError("reading from stdin while output is captured")
E OSError: reading from stdin while output is captured
-------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
('\nEpoch:\n', 399)
------------------------
value:
```
* Adding fix from #1056 -- thanks @QuantumNovice
* if __name__ == '__main__':
* pytest --ignore=virtualenv # do not test our dependencies