193 Commits

Author SHA1 Message Date
837bfffd99 Rename sorted_vector_machines.py to support_vector_machines.py (#1195)
SVM stands for support vector machines. Intuitively, a support vector is the vector right near the decision boundary.
2019-09-22 16:56:32 +02:00
a2b5a90c11 Added sequential minimum optimization algorithm for SVM (#508)
* Implementation of sequential minimal optimization algorithm

* Update smo.py

* Add demonstration of svm partition boundary

1:Use matplotlib show svm's partition boundary
2:Automatically download test dataset

* Update smo.py

* Update smo.py

* Rename smo.py to sequential_minimum_optimization.py

* Update doc and simplify the code.

Fix filename typo error in doc.
Use ternary conditional operator in predict()

* Update doc.
2019-09-18 22:01:05 +08:00
2f8516e561 implementation of sorted vector machines (#1156)
* 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
2019-08-28 12:56:43 +02:00
47a9ea2b0b Simplify code by dropping support for legacy Python (#1143)
* Simplify code by dropping support for legacy Python

* sort() --> sorted()
2019-08-19 15:37:49 +02:00
36684db278 Travis CI: Add pytest --doctest-modules machine_learning (#1016)
* 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
2019-08-10 22:48:00 +02:00
32c0418f63 Infinite loop was fixed. (#1105)
* Infinite loop was fixed.
Removed issue of unused variables.

* Update logistic_regression.py

* Update logistic_regression.py

* correct spacing according to PEP8
2019-08-07 21:39:44 +02:00
89acf5d017 print() is a function just like every other function (#1101)
* print() is a function just like every other function
2019-08-06 12:14:23 +02:00
a9ecdb33ca Validate Python filenames (#1086) 2019-07-30 15:32:13 +05:30
0d61539883 Log_likelihood update (#1008)
* Add files via upload

This is a simple exploratory notebook that heavily expolits pandas and seaborn

* Update logistic_regression.py

* Update logistic_regression.py

* Rename Food wastage analysis from 1961-2013 (FAO).ipynb to other/Food wastage analysis from 1961-2013 (FAO).ipynb

* Update logistic_regression.py

* Update logistic_regression.py

* Update logistic_regression.py

* Update logistic_regression.py

* Update logistic_regression.py

* Update logistic_regression.py

* Update logistic_regression.py
2019-07-13 21:54:38 +02:00
4e413c0183 Updated README 2019-07-06 11:11:20 +05:30
afb98e6c23 KNN (#944)
Creates an example of KNN algorithm using sklearn library.
2019-07-05 14:17:18 +05:30
1b3affc2ed fix typo (#902) 2019-06-16 02:07:23 +05:30
49fc9a1aed Random Forest Classification added 2018-10-27 08:12:16 +05:30
349450b957 Random Forest Regression Added 2018-10-27 08:08:03 +05:30
3fa8f7bc2f Update logistic_regression.py 2018-10-24 21:20:28 +02:00
ea2ddaaf6a all valid python 3 2018-10-20 14:45:08 -05:00
b566055e4b Merge branch 'master' of https://github.com/TheAlgorithms/Python 2018-10-20 14:15:21 -05:00
91fccecb56 snake_case all the things 2018-10-19 17:14:25 -05:00
116ab0fa96 Merge branch 'master' of git://github.com/epicalyx/Python into epicalyx-master 2018-10-19 15:44:30 +02:00
81dc87aeb1 Merge branch 'master' of git://github.com/Himani2000/Python into Himani2000-master 2018-10-19 15:13:52 +02:00
5d1f72604d Improved Code and removed Warnings (#483) 2018-10-19 14:00:31 +05:30
07451a6ca4 Improved Code and removed warnings (#482)
Improved Code and removed warnings
2018-10-19 13:28:21 +05:30
0856a61859 Remove Multiple Unused Imports and Variable 2018-10-18 02:58:57 +05:30
7105f6f648 minor changes
requested changes are addressed
2018-10-17 01:07:29 +05:30
f018ddc4c0 requested changes addressed 2018-10-17 00:52:32 +05:30
ade3ed3784 Logistic regression implementation
implementation of logistic regression for binary classification
2018-10-17 00:22:44 +05:30
4fc68bbb4c Update Reuters - OneVsRestClassifier.ipynb 2018-10-12 18:50:00 +02:00
67a31e4b2f Reuters - OneVsRestClassifier (I'd also uploaded the same at: https://www.kaggle.com/harshildarji/reuters-onevsrestclassifier) 2018-10-12 18:46:45 +02:00
ee8c01179d Add files via upload 2018-10-09 01:51:14 +05:30
4ee0e620cb Modernize Python 2 code to get ready for Python 3 AGAIN 2018-01-21 08:25:19 +01:00
2ed1bad747 Merge branch 'master' into modernize-python2-code 2017-12-13 16:32:28 +01:00
e31c780d94 Modernize Python 2 code to get ready for Python 3 2017-11-25 12:41:55 +01:00
4e06949072 Modernize Python 2 code to get ready for Python 3 2017-11-25 10:23:50 +01:00
80bdfbb9f9 add mean bias deviation in scoring functions 2017-11-18 10:34:07 +07:00
6bc30c7182 Merge pull request #139 from anuragkumarak95/master
added k means clustering algorithm, usage doc inside.
2017-10-17 18:50:48 +05:30
37967bd0cf Fixed case where function didn't return where it should
I added these return statements so that invalid inputs or valid end cases would no longer continue running through the rest of the function.
2017-10-09 12:42:51 -05:00
8fb1eb7bdf Implementation of a regression tree in python
I've implemented a basic decision tree in python as an example of how they work. Although the class I've created only works on one dimensional data sets, the reader should be able to generalize it to higher dimensions should they need to.
2017-10-09 12:36:33 -05:00
07fb7d695a added k means clustering algorithm, usage doc inside. 2017-10-02 21:13:43 +05:30
f5fc930c1b Merge pull request #108 from frmatias/master
Perceptron - one neuron
2017-09-03 13:04:51 +05:30
a51be755d4 Perceptron - one neuron 2017-08-29 13:43:42 -03:00
5b03d56cd6 scoring functions added 2017-08-19 14:23:00 +09:00
1727d79d97 Added Linear regression 2017-06-27 17:56:27 +05:30
=
64d29ef2ad -Added Gradient Descent Algorithm 2017-06-23 02:09:42 +05:30