Commit Graph

109 Commits

Author SHA1 Message Date
Suleyman TURKMEN 0e6a2c0491 fix legacy constants 2022-01-03 15:08:10 +03:00
Alexander Alekhin cfb77091ca Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-04-15 20:50:26 +00:00
Danny a9a6801c6d Merge pull request #19884 from danielenricocahall:fix-prediction-features-bug
Fix bug with predictions in RTrees/Boost

* address bug where predict functions with invalid feature count in rtrees/boost models

* compact matrix rep in tests

* check 1..n-1 and n+1 in feature size validation test
2021-04-09 16:56:14 +00:00
Alexander Alekhin ca8c3dd9b5 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-03-22 12:05:23 +00:00
Alexander Alekhin 7664e6d090 ml: use OpenCV license header for logistic regression 2021-03-17 20:29:52 +00:00
Alexander Alekhin 5c76f99fdd Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-09-05 19:37:38 +00:00
Danny c31164bf1e Merge pull request #18126 from danielenricocahall:add-oob-error-sample-weighting
Account for sample weights in calculating OOB Error

* account for sample weights in oob error calculation

* redefine oob error functions

* fix ABI compatibility
2020-09-05 18:52:10 +00:00
Danny 20b23da8e2 Merge pull request #18061 from danielenricocahall:fix-kd-tree
Fix KD Tree kNN Implementation

* Make KDTree mode in kNN functional

remove docs and revert change

Make KDTree mode in kNN functional

spacing

Make KDTree mode in kNN functional

fix window compilations warnings

Make KDTree mode in kNN functional

fix window compilations warnings

Make KDTree mode in kNN functional

casting

Make KDTree mode in kNN functional

formatting

Make KDTree mode in kNN functional

* test coding style
2020-09-04 17:01:05 +00:00
Alexander Alekhin 01a28db949 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-11-29 18:57:33 +03:00
Maksim Shabunin 5ff1fababc Merge pull request #15959 from mshabunin:refactor-ml-tests
ml: refactored tests

* use parametrized tests where appropriate
* use stable theRNG in most tests
* use modern style with EXPECT_/ASSERT_ checks
2019-11-25 23:03:16 +03:00
Alexander Alekhin e2a5a6a05c Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-09-25 18:32:44 +00:00
Alexander Alekhin fef7fc343e ml: add checks of empty train data 2019-09-22 11:12:19 +00:00
luz.paz fcc7d8dd4e Fix modules/ typos
Found using `codespell -q 3 -S ./3rdparty -L activ,amin,ang,atleast,childs,dof,endwhile,halfs,hist,iff,nd,od,uint`

backporting of commit: ec43292e1e
2019-08-16 17:34:29 +03:00
luz.paz ec43292e1e Fix modules/ typos
Found using `codespell -q 3 -S ./3rdparty -L activ,amin,ang,atleast,childs,dof,endwhile,halfs,hist,iff,nd,od,uint`
2019-08-15 18:02:09 -04:00
Alexander Alekhin 665408e57f Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-02-01 13:17:32 +03:00
Hannah McLaughlin 418898029c Merge pull request #13718 from lochsh:svm-sigmoid-fix
SVM sigmoid kernel fix (issue #13621) (#13718)

* Added test for sigmoid case for retrieving support vectors

* undo unhelpful test

* add test for sigmoid SVM with data that is easily separable into two concentric circles

* Update sigmoid kernel to use tanh(gamma * <x, y> + coef0) instead of -tanh(gamma * <x, y> + coef0)

* remove unnecessary constraint on coef0

* cleanup

* fixing inappropriate use of doubles

* Add f to float literal

* replace CV_Assert with ASSERT_EQ where appropriate
2019-01-31 15:34:36 +03:00
Vadim Pisarevsky 0f622206e4 completely new C++ persistence implementation (#13011)
* integrated the new C++ persistence; removed old persistence; most of OpenCV compiles fine! the tests have not been run yet

* fixed multiple bugs in the new C++ persistence

* fixed raw size of the parsed empty sequences

* [temporarily] excluded obsolete applications traincascade and createsamples from build

* fixed several compiler warnings and multiple test failures

* undo changes in cocoa window rendering (that was fixed in another PR)

* fixed more compile warnings and the remaining test failures (hopefully)

* trying to fix the last little warning
2018-11-02 00:27:06 +03:00
Alexander Alekhin df8b057b44 avoid Ptr<> == NULL checks 2018-09-09 19:30:46 +00:00
Alexander Alekhin d74b98c3d9 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-04 18:39:03 +00:00
Jakub Golinowski 9f1218b00b Merge pull request #11897 from Jakub-Golinowski:hpx_backend
* Add HPX backend for OpenCV implementation
Adds hpx backend for cv::parallel_for_() calls respecting the nstripes chunking parameter. C++ code for the backend is added to modules/core/parallel.cpp. Also, the necessary changes to cmake files are introduced.
Backend can operate in 2 versions (selectable by cmake build option WITH_HPX_STARTSTOP): hpx (runtime always on) and hpx_startstop (start and stop the backend for each cv::parallel_for_() call)

* WIP: Conditionally include hpx_main.hpp to tests in core module
Header hpx_main.hpp is included to both core/perf/perf_main.cpp and core/test/test_main.cpp.
The changes to cmake files for linking hpx library to above mentioned test executalbles are proposed but have issues.

* Add coditional iclusion of hpx_main.hpp to cpp cpu modules

* Remove start/stop version of hpx backend
2018-08-31 16:23:26 +03:00
berak e13f6ded7f ml: fix adjusting K in KNearest (#12358) 2018-08-31 16:07:53 +03:00
Alexander Alekhin 7d4bb9428b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-08-20 19:30:18 +03:00
Alexander Alekhin 7ee69740e8 ml(test): test different samples layout of TrainData 2018-08-17 16:57:20 +03:00
Alexander Alekhin cd2b188c9a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-04-24 18:13:06 +03:00
Alexander Alekhin 6b581c4e51 build: unreachable code after CV_Error() (part 2) 2018-04-24 16:03:40 +03:00
Alexander Alekhin 2385a5870e next(ml): eliminate dummy interface class ANN_MLP_ANNEAL 2018-04-10 18:09:54 +03:00
Alexander Alekhin 12d2bd4adb ml: refactor ML_ANN test 2018-02-19 21:35:48 +03:00
luz.paz e805a55a5b Misc. modules/ typos (cont.)
Found via `codespell`
2018-02-12 10:15:36 -05:00
Alexander Alekhin 4a297a2443 ts: refactor OpenCV tests
- removed tr1 usage (dropped in C++17)
- moved includes of vector/map/iostream/limits into ts.hpp
- require opencv_test + anonymous namespace (added compile check)
- fixed norm() usage (must be from cvtest::norm for checks) and other conflict functions
- added missing license headers
2018-02-03 19:39:47 +00:00
Alexander Alekhin aef3019152 ml: fix SimulatedAnnealingSolver interface 2017-12-15 21:44:32 +03:00
LaurentBerger 7ad308ea47 Simulated Annealing for ANN_MLP training method (#10213)
* Simulated Annealing for ANN_MLP training method

* EXPECT_LT

* just to test new data

* manage RNG

* Try again

* Just run buildbot with new data

* try to understand

* Test layer

* New data- new test

* Force RNG in backprop

* Use Impl to avoid virtual method

* reset all weights

* try to solve ABI

* retry

* ABI solved?

* till problem with dynamic_cast

* Something is wrong

* Solved?

* disable backprop test

* remove ANN_MLP_ANNEALImpl

* Disable weight in varmap

* Add example for SimulatedAnnealing
2017-12-15 13:57:39 +03:00
LaurentBerger a44573c43b Add ReLU and LeakyReLU activation function in ml module 2017-11-28 11:02:05 +01:00
Alexander Alekhin 006966e629 trace: initial support for code trace 2017-06-26 17:07:13 +03:00
David Carlier bacc210606 fixing segfaults occuring when launching those unit tests 2017-04-18 09:50:17 +01:00
mrquorr d8425d8881 finished for one sample
Finished with several samples support, need regression testing

Gave a more relevant name to function (getVotes)

Finished implicit implementation

Removed printf, finished regresion testing

Fixed conversion warning

Finished test for Rtrees

Fixed documentation

Initialized variable

Added doxygen documentation

Added parameter name
2017-02-28 11:14:33 -06:00
MYLS 8596e82d98 Add JSON support.
a JSON emitter, a parser, tests and some basic doc.
2016-08-11 00:53:15 +08:00
MYLS 617df09143 Modify Base64 functions and add test and documentation
Major changes:

- modify the Base64 functions to compatible with `cvWriteRawData` and so
on.
- add a Base64 flag for FileStorage and outputs raw data in Base64
automatically.
- complete all  testing and documentation.
2016-07-19 15:54:38 +08:00
Marina Noskova 53711ec29d Deleted default value for parameters in docs.
Added some asserts.
2016-02-25 19:12:54 +03:00
Marina Noskova d484893839 Deleted functions makeTrainData() and makeTestData() in test_svmsgd.cpp.
Added function makeData() in test_svmsgd.cpp.
2016-02-25 16:57:03 +03:00
Marina Noskova 74c87a26a5 Delete function areClassesEmpty(). 2016-02-25 15:31:07 +03:00
Marina Noskova f3c4a6aab8 Rename parameters lambda, gamma0 and c. 2016-02-24 13:22:07 +03:00
Marina Noskova ff54952769 Corrected spelling mistakes 2016-02-15 14:35:36 +03:00
Marina Noskova 5496dedd6a Fixed warnings. 2016-02-10 19:46:24 +03:00
Marina Noskova 617dd5db5b Fixed doc/opencv.bib 2016-02-10 17:57:36 +03:00
Marina Noskova 05353a1492 Removed trailing whitespaces 2016-02-10 16:59:12 +03:00
Marina Noskova 41c0a38344 Fixed test samples for tests with different borders
Added new test (separating two points)
2016-02-10 16:59:12 +03:00
Marina Noskova bfdca05f25 Added margin type, added tests with different scales of features.
Also fixed documentation, refactored sample.
2016-02-10 16:59:12 +03:00
Marina Noskova acd74037b3 Increasing the dimension of features space in the SVMSGD::train function. 2016-02-10 16:59:11 +03:00
Marina Noskova 40bf97c6d1 Refactored SVMSGD class 2016-02-10 16:56:14 +03:00
berak 5afd0e211e ml: fix NormalBayesClassifier bulk prediction(#5911) 2016-01-04 11:47:08 +01:00