Skip to main content
Copyright (c) 2016 fukuball

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Description: FukuML
=========

.. image:: https://travis-ci.org/fukuball/fuku-ml.svg?branch=master
:target: https://travis-ci.org/fukuball/fuku-ml

.. image:: https://codecov.io/github/fukuball/fuku-ml/coverage.svg?branch=master
:target: https://codecov.io/github/fukuball/fuku-ml?branch=master

.. image:: https://badge.fury.io/py/FukuML.svg
:target: https://badge.fury.io/py/FukuML

.. image:: https://api.codacy.com/project/badge/grade/afc87eff27ab47d6b960ea7b3088c469
:target: https://www.codacy.com/app/fukuball/fuku-ml

.. image:: https://img.shields.io/badge/made%20with-%e2%9d%a4-ff69b4.svg
:target: http://www.fukuball.com

Simple machine learning library / 簡單易用的機器學習套件

Installation
============

.. code-block:: bash

$ pip install FukuML

Tutorial
============

- Lesson 1: `Perceptron Binary Classification Learning Algorithm`_

- Appendix 1: `Play With Your Own Dataset`_

.. _Perceptron Binary Classification Learning Algorithm: https://github.com/fukuball/FukuML-Tutorial/blob/master/Perceptron%20Binary%20Classification%20Learning%20Algorithm%20Tutorial.ipynb

.. _Play With Your Own Dataset: https://github.com/fukuball/FukuML-Tutorial/blob/master/Play%20With%20Your%20Own%20Dataset%20Tutorial.ipynb

Algorithm
============

- Perceptron Binary Classification Learning Algorithm

- Perceptron Multi Classification Learning Algorithm

- Pocket Perceptron Binary Classification Learning Algorithm

- Pocket Perceptron Multi Classification Learning Algorithm

- Linear Regression Learning Algorithm

- Linear Regression Binary Classification Learning Algorithm

- Linear Regression Multi Classification Learning Algorithm

- Ridge Regression Learning Algorithm

- Ridge Regression Binary Classification Learning Algorithm

- Ridge Regression Multi Classification Learning Algorithm

- Kernel Ridge Regression Learning Algorithm

- Kernel Ridge Regression Binary Classification Learning Algorithm

- Kernel Ridge Regression Multi Classification Learning Algorithm

- Logistic Regression Learning Algorithm

- Logistic Regression Binary Classification Learning Algorithm

- Logistic Regression One vs All Multi Classification Learning Algorithm

- Logistic Regression One vs One Multi Classification Learning Algorithm

- L2 Regularized Logistic Regression Learning Algorithm

- L2 Regularized Logistic Regression Binary Classification Learning Algorithm

- Kernel Logistic Regression Learning Algorithm

- Primal Hard Margin Support Vector Machine Binary Classification Learning Algorithm

- Dual Hard Margin Support Vector Machine Binary Classification Learning Algorithm

- Polynomial Kernel Support Vector Machine Binary Classification Learning Algorithm

- Gaussian Kernel Support Vector Machine Binary Classification Learning Algorithm

- Soft Polynomial Kernel Support Vector Machine Binary Classification Learning Algorithm

- Soft Gaussian Kernel Support Vector Machine Binary Classification Learning Algorithm

- Polynomial Kernel Support Vector Machine Multi Classification Learning Algorithm

- Gaussian Kernel Support Vector Machine Multi Classification Learning Algorithm

- Soft Polynomial Kernel Support Vector Machine Multi Classification Learning Algorithm

- Soft Gaussian Kernel Support Vector Machine Multi Classification Learning Algorithm

- Probabilistic Support Vector Machine Learning Algorithm

- Least Squares Support Vector Machine Binary Classification Learning Algorithm

- Least Squares Support Vector Machine Multi Classification Learning Algorithm

- Support Vector Regression Learning Algorithm

- Decision Stump Binary Classification Learning Algorithm

- AdaBoost Stump Binary Classification Learning Algorithm

- Decision Tree Classification Learning Algorithm

- Decision Tree Regression Learning Algorithm

- Neural Network Learning Algorithm

- Neural Network Binary Classification Learning Algorithm

- Linear Regression Accelerator

- Polynomial Feature Transform

- Legendre Feature Transform

- 10 Fold Cross Validation

- Uniform Blending for Classification

- Linear Blending for Classification

Usage
============

.. code-block:: py

>>> import numpy as np
# we need numpy as a base libray

>>> import FukuML.PLA as pla
# import FukuML.PLA to do Perceptron Learning

>>> your_input_data_file = '/path/to/your/data/file'
# assign your input data file, please check the data format: https://github.com/fukuball/fuku-ml/blob/master/FukuML/dataset/pla_binary_train.dat

>>> pla_bc = pla.BinaryClassifier()
# new a PLA binary classifier

>>> pla_bc.load_train_data(your_input_data_file)
# load train data

>>> pla_bc.set_param()
# set parameter

>>> pla_bc.init_W()
# init the W

>>> W = pla_bc.train()
# train by Perceptron Learning Algorithm to find best W

>>> test_data = 'Each feature of data x separated with spaces. And the ground truth y put in the end of line separated by a space'
# assign test data, format like this '0.97681 0.10723 0.64385 ........ 0.29556 1'

>>> prediction = pla_bc.prediction(test_data)
# prediction by trained W

>>> print prediction['input_data_x']
# print test data x

>>> print prediction['input_data_y']
# print test data y

>>> print prediction['prediction']
# print the prediction, will find out prediction is the same as pla_bc.test_data_y

For detail, please check https://github.com/fukuball/fuku-ml/blob/master/doc/sample_code.rst

License
=========
The MIT License (MIT)

Copyright (c) 2016 fukuball

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Keywords: Machine Learning,Perceptron Learning Algorithm,PLA,Pocket Perceptron Learning Algorithm,Pocket PLA,Linear Regression,Logistic Regression,Ridge Regression,Binay Classifier,Multi Classifier
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Machine Learning :: Perceptron Learning Algorithm
Classifier: Machine Learning :: Pocket Perceptron Learning Algorithm
Classifier: Machine Learning :: Linear Regression Learning Algorithm
Classifier: Machine Learning :: Logistic Regression Learning Algorithm
Classifier: Machine Learning :: Ridge Regression Learning Algorithm
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Education
Classifier: Topic :: Software Development :: Machine Learning
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Machine Learning
Classifier: Topic :: Utilities

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FukuML-0.3.3.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

FukuML-0.3.3-py2.py3-none-any.whl (1.4 MB view details)

Uploaded Python 2Python 3

File details

Details for the file FukuML-0.3.3.tar.gz.

File metadata

  • Download URL: FukuML-0.3.3.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for FukuML-0.3.3.tar.gz
Algorithm Hash digest
SHA256 90575a209bcc9e07deaa7a197101004f57272c9ebbb727602fbfa5daf5a3ab05
MD5 43673c25d904f1fbd98f6668a7f0fafb
BLAKE2b-256 cd723e4a3bff290d81821538763a6434b9b3df0ca1e541c3f544325be7a1c552

See more details on using hashes here.

File details

Details for the file FukuML-0.3.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for FukuML-0.3.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0646a7a3d3bc8c1323da8cd57a02fc55341ad4ba3d1484df83244c7622a3979b
MD5 815fc0ee9d02c1bfba3fa8cffc86a3ca
BLAKE2b-256 58d1cb5fe90ff38bfddb02f2d67c4bdb61469cbc02d8d3e8736c6364cc08df84

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.1

2 files

0.4.0

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

This release

0.3.3 This release

2 files

0.3.2

2 files

0.3.0

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

1 file

0.2.0

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page