Commit Graph

432 Commits

Author SHA1 Message Date
Yuji Uchiyama
c4f58f7f6f Fix logistic regression implementation (#169)
* Fix target value of LogisticRegression

* Fix probability calculation in LogisticRegression

* Change the default cost function to log-likelihood

* Remove redundant round function

* Fix for coding standard
2017-12-05 12:03:55 +01:00
Tomáš Votruba
946fbbc521 Tests: use PHPUnit (6.4) exception methods (#165)
* tests: update to PHPUnit 6.0 with rector

* [cs] clean empty docs

* composer: bump to PHPUnit 6.4

* tests: use class references over strings

* cleanup
2017-11-28 08:00:13 +01:00
Tomáš Votruba
726cf4cddf Added EasyCodingStandard + lots of code fixes (#156)
* travis: move coveralls here, decouple from package

* composer: use PSR4

* phpunit: simpler config

* travis: add ecs run

* composer: add ecs dev

* use standard vendor/bin directory for dependency bins, confuses with local bins and require gitignore handling

* ecs: add PSR2

* [cs] PSR2 spacing fixes

* [cs] PSR2 class name fix

* [cs] PHP7 fixes - return semicolon spaces, old rand functions, typehints

* [cs] fix less strict typehints

* fix typehints to make tests pass

* ecs: ignore typehint-less elements

* [cs] standardize arrays

* [cs] standardize docblock, remove unused comments

* [cs] use self where possible

* [cs] sort class elements, from public to private

* [cs] do not use yoda (found less yoda-cases, than non-yoda)

* space

* [cs] do not assign in condition

* [cs] use namespace imports if possible

* [cs] use ::class over strings

* [cs] fix defaults for arrays properties, properties and constants single spacing

* cleanup ecs comments

* [cs] use item per line in multi-items array

* missing line

* misc

* rebase
2017-11-22 22:16:10 +01:00
David Monllaó
b1d40bfa30 Change from theta to learning rate var name in NN (#159) 2017-11-20 23:39:50 +01:00
David Monllaó
333598b472 Fix backpropagation random error (#157) 2017-11-20 23:11:21 +01:00
Qingshan Luo
ff80af2044 code style Update Phpml\Math\Distance\Manhattan::distance() method. (#154)
I think this will be better.
2017-11-16 21:45:35 +01:00
David Monllaó
f7537c049a documentation add tokenizer->fit required to build the dictionary (#155) 2017-11-16 21:40:11 +01:00
Arkadiusz Kondas
a11e3f69c3
Add support for coveralls.io (#153)
* Add support for coveralls.io

* Generate coverage report only on php 7.2 build

* Fix osx travis build and move tools to bin dir

* Update php version badge

* Fix travis conditional statement

* Fix travis conditional statement

* 🤦 fix bin path
2017-11-15 11:08:51 +01:00
Arkadiusz Kondas
e33992ddde
Update changelog (#152) 2017-11-14 21:40:46 +01:00
Tomáš Votruba
653c7c772d Upgrade to PHP 7.1 (#150)
* upgrade to PHP 7.1

* bump travis and composer to PHP 7.1

* fix tests
2017-11-14 21:21:23 +01:00
Tomáš Votruba
331d4b133e travis: add PHP 7.2 (#147) 2017-11-13 16:54:04 +01:00
Tomáš Votruba
d85bfed468 [cs] remove more unused comments (#146)
* [cs] remove more unused comments

* [cs] remove unused array phpdocs

* [cs] remove empty lines in docs

* [cs] space-proof useless docs

* [cs] remove empty @param lines

* [cs] remove references arrays
2017-11-13 11:42:40 +01:00
Tomáš Votruba
f4650c696c [coding standard] fix imports order and drop unused docs typehints (#145)
* fix imports order

* drop unused docs typehints, make use of return types where possible
2017-11-06 08:56:37 +01:00
Tomáš Votruba
a0772658bf README: require absolute composer (#141) 2017-10-25 08:09:23 +02:00
Marcin Michalski
11d05ce89d Comparison - replace eval (#130)
* Replace eval with strategy

* Use Factory Pattern, add tests

* Add missing dockblocks

* Replace strategy with simple object
2017-10-24 18:59:12 +02:00
Arkadiusz Kondas
dda9e16b4c Add software quaility awards 2017 badge by @yegor256 2017-10-24 08:31:29 +02:00
Maxim Kasatkin
b48b82bd34 DBSCAN fix for associative keys and array_merge performance optimization (#139) 2017-10-18 10:59:37 +02:00
Marcin Michalski
61d2b7d115 Ensure user-provided SupportVectorMachine paths are valid (#126) 2017-09-02 22:44:19 +02:00
Marcin Michalski
ba2b8c8a9c Use C-style casts (#124) 2017-09-02 21:41:06 +02:00
Marcin Michalski
8c06a55a16 Make tests namespace consistent (#125) 2017-09-02 21:39:59 +02:00
Marcin Michalski
03751f51ed Speed up DataTransformer (#122) 2017-09-02 21:38:02 +02:00
Marcin Michalski
b1be0574d8 Add PReLU activation function (#128)
* Implement RELU activation functions

* Add PReLUTest
2017-09-02 21:31:14 +02:00
Marcin Michalski
0e59cfb174 Add ThresholdedReLU activation function (#129) 2017-09-02 21:30:35 +02:00
Gary Fuller
cacfd64a6f Update README.md (#99) 2017-09-02 21:24:51 +02:00
Marcin Michalski
3e2708de17 Fix #120 (#121)
* Fix #120

* Add DecisionTreeLeafTest
2017-08-28 13:00:24 +02:00
Yuji Uchiyama
136a92c82b Support CSV with long lines (#119) 2017-08-21 08:08:54 +02:00
Marcin Michalski
3ac658c397 php-cs-fixer - more rules (#118)
* Add new cs-fixer rules and run them

* Do not align double arrows/equals
2017-08-17 08:50:37 +02:00
Ante Lucic
ed5fc8996c Require php-cs-fixer as dev dependency (#111)
* require friendsofphp/php-cs-fixer as dev dependency

* update contributing with php-cs-fixer example
2017-07-28 12:29:09 +02:00
Ante Lucic
47cdff0481 fix invalid typehint for subs method (#110) 2017-07-26 08:36:34 +02:00
Ante Lucic
65b8a13612 Change Optimizer::runOptimization visibility from protected to public (#109) 2017-07-26 08:26:22 +02:00
Ante Lucic
07041ec608 Run newest php-cs-fixer (#108) 2017-07-26 08:24:47 +02:00
Ante Lucic
08d974bb4c Add missing @throws and @param docblocks (#107) 2017-07-26 08:22:12 +02:00
Hiroyuki Miura
3bcba4053e Update README.md (#95)
I tried copying the sample code as it is but did not do what I assumed.
Specifically, it is as follows.

- It does not work without `require_once`
- I can not check the output if it is `return`

I modified the README.md.
I think that this one is better.
Because you can use it as soon as you copy it.
2017-05-29 09:39:08 +02:00
Maxime COLIN
2d3b44f1a0 Fix samples transformation in Pipeline training (#94) 2017-05-24 09:06:54 +02:00
David Monllaó
de50490154 Neural networks partial training and persistency (#91)
* Neural networks partial training and persistency

* cs fixes

* Add partialTrain to nn docs

* Test for invalid partial training classes provided
2017-05-23 09:03:05 +02:00
Maxime COLIN
3dff40ea1d Add french stopwords (#92)
* Add french stopwords

* Add french stopwords test
2017-05-22 23:18:27 +02:00
David Monllaó
4af8449b1c Neural networks improvements (#89)
* MultilayerPerceptron interface changes

- Signature closer to other algorithms
- New predict method
- Remove desired error
- Move maxIterations to constructor

* MLP tests for multiple hidden layers and multi-class

* Update all MLP-related tests

* coding style fixes

* Backpropagation included in multilayer-perceptron
2017-05-18 00:07:14 +02:00
Marcin Michalski
7ab80b6e56 Code Style (#86)
* Code Style

* Code Review fixes
2017-05-17 09:03:25 +02:00
Humberto Castelo Branco
43f15d2f7e New methods: setBinPath, setVarPath in SupportVectorMachine (#73)
* new methods: setBinPath, setVarPath

* fix whitespaces and breaklines
2017-05-13 12:58:06 +02:00
Marcin Michalski
7eee6748d2 php-cs-fixer (#85)
Remove obsolete php-cs-fixer.sh script
Update contributing guidelines
2017-05-13 12:57:32 +02:00
Mustafa Karabulut
5b373fa7c2 Linear Discrimant Analysis (LDA) (#82)
* Linear Discrimant Analysis (LDA)

* LDA test file

* Matrix inverse via LUDecomposition

* LUDecomposition inverse() and det() applied

* Readme update for LDA
2017-04-25 08:58:02 +02:00
David Monllaó
12b8b118dd Fix division by 0 error during normalization (#83)
* Fix division by 0 error during normalization

std is 0 when a feature has the same value in samples.

* Expand std normalization test
2017-04-24 11:47:30 +02:00
Mustafa Karabulut
a87859dd97 Linear algebra operations, Dimensionality reduction and some other minor changes (#81)
* Lineer Algebra operations

* Covariance

* PCA and KernelPCA

* Tests for PCA, Eigenvalues and Covariance

* KernelPCA update

* KernelPCA and its test

* KernelPCA and its test

* MatrixTest, KernelPCA and PCA tests

* Readme update

* Readme update
2017-04-23 09:03:30 +02:00
Arkadiusz Kondas
6296e44db0 cs fixer 2017-04-19 22:28:07 +02:00
David Monllaó
e1854d44a2 Partial training base (#78)
* Cost values for multiclass OneVsRest uses

* Partial training interface

* Reduce linear classifiers memory usage

* Testing partial training and isolated training

* Partial trainer naming switched to incremental estimator

Other changes according to review's feedback.

* Clean optimization data once optimize is finished

* Abstract resetBinary
2017-04-19 22:26:31 +02:00
David Monllaó
c0463ae087 Fix wrong docs references (#79) 2017-04-13 21:34:55 +02:00
Humberto Castelo Branco
b27f08f420 Add delimiter option for CsvDataset (#66)
Useful option when the CSV file uses another delimiter character other than the comma, for example, as the semicolon or tab character.
2017-03-29 12:58:12 +02:00
Mustafa Karabulut
49234429f0 LogisticRegression classifier & Optimization methods (#63)
* LogisticRegression classifier & Optimization methods

* Minor fixes to Logistic Regression & Optimizers PR

* Addition for getCostValues() method
2017-03-27 23:46:53 +02:00
Kyle Warren
c44f3b2730 Additional training for SVR (#59)
* additional training SVR

* additional training SVR, missed old labels reference

* SVM labels parameter now targets

* SVM member labels now targets

* SVM init targets empty array
2017-03-17 11:44:45 +01:00
Bill Nunney
8be19567a2 Update imputation example to use transform method (#57) 2017-03-09 20:41:15 +01:00