Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch upstream 'develop' into feature/jubacore

Conflicts:
	src/regression/regression_factory.cpp
	src/server/anomaly_serv.cpp
	src/server/graph_serv.cpp
	src/server/recommender_serv.cpp
	src/server/stat_serv.hpp
	src/stat/mixable_stat.cpp
	src/stat/mixable_stat_test.cpp
  • Loading branch information...
commit 3cd1677947b9e4fef7feb301a6d213c551cc362e 2 parents 360b5f9 + 0e415d1
@suma suma authored
Showing with 2,346 additions and 1,347 deletions.
  1. +5 −1 .gitignore
  2. +233 −0 ChangeLog.rst
  3. +41 −216 README.rst
  4. +14 −10 client/anomaly_client.hpp
  5. +13 −21 client/anomaly_types.hpp
  6. +15 −6 client/classifier_client.hpp
  7. +15 −26 client/classifier_types.hpp
  8. +27 −23 client/graph_client.hpp
  9. +23 −40 client/graph_types.hpp
  10. +19 −15 client/recommender_client.hpp
  11. +14 −22 client/recommender_types.hpp
  12. +15 −6 client/regression_client.hpp
  13. +13 −21 client/regression_types.hpp
  14. +20 −11 client/stat_client.hpp
  15. +9 −14 client/stat_types.hpp
  16. +2 −2 src/anomaly/lof_storage.cpp
  17. +8 −8 src/classifier/arow.cpp
  18. +4 −4 src/classifier/arow.hpp
  19. +5 −5 src/classifier/classifier.hpp
  20. +4 −0 src/classifier/classifier_base.cpp
  21. +2 −0  src/classifier/classifier_base.hpp
  22. +17 −13 src/classifier/classifier_factory.cpp
  23. +16 −5 src/classifier/classifier_test.cpp
  24. +14 −12 src/classifier/{cw.cpp → confidence_weighted.cpp}
  25. +9 −7 src/classifier/{cw.hpp → confidence_weighted.hpp}
  26. +12 −10 src/classifier/{nherd.cpp → normal_herd.cpp}
  27. +7 −7 src/classifier/{nherd.hpp → normal_herd.hpp}
  28. +5 −5 src/classifier/{pa.cpp → passive_aggressive.cpp}
  29. +5 −5 src/classifier/{pa.hpp → passive_aggressive.hpp}
  30. +10 −8 src/classifier/{pa1.cpp → passive_aggressive_1.cpp}
  31. +9 −7 src/classifier/{pa1.hpp → passive_aggressive_1.hpp}
  32. +11 −8 src/classifier/{pa2.cpp → passive_aggressive_2.cpp}
  33. +9 −7 src/classifier/{pa2.hpp → passive_aggressive_2.hpp}
  34. +5 −5 src/classifier/wscript
  35. +9 −8 src/cmd/jubactl.cpp
  36. +0 −45 src/common/config_util.hpp
  37. +0 −66 src/common/config_util_test.cpp
  38. +3 −3 src/common/key_manager.cpp
  39. +0 −1  src/common/mprpc/exception.hpp
  40. +112 −14 src/common/mprpc/rpc_client_test.cpp
  41. +135 −0 src/common/mprpc/rpc_util.hpp
  42. +3 −0  src/common/network.cpp
  43. +0 −59 src/common/rpc_util.hpp
  44. +2 −0  src/common/util.cpp
  45. +0 −2  src/common/wscript
  46. +0 −1  src/core/diffv.hpp
  47. +3 −0  src/core/linear_function_mixer_test.cpp
  48. +1 −0  src/core/mixable_weight_manager.cpp
  49. +0 −1  src/framework.hpp
  50. +6 −1 src/framework/keeper.cpp
  51. +19 −12 src/framework/keeper.hpp
  52. +2 −0  src/framework/server_helper.cpp
  53. +2 −0  src/framework/server_helper.hpp
  54. +5 −1 src/framework/server_util.cpp
  55. +2 −0  src/framework/server_util.hpp
  56. +18 −8 src/fv_converter/converter_config.cpp
  57. +10 −15 src/fv_converter/converter_config.hpp
  58. +4 −1 src/fv_converter/converter_config_test.cpp
  59. +1 −1  src/fv_converter/counter.hpp
  60. +46 −0 src/fv_converter/except_match.hpp
  61. +14 −15 src/{common/config_util.cpp → fv_converter/except_match_test.cpp}
  62. +1 −1  src/fv_converter/keyword_weights.cpp
  63. +1 −1  src/fv_converter/revert.cpp
  64. +16 −0 src/fv_converter/revert_test.cpp
  65. +5 −0 src/fv_converter/weight_manager.hpp
  66. +1 −0  src/fv_converter/wscript
  67. +4 −4 src/graph/graph_type.hpp
  68. +14 −13 src/jubavisor/jubavisor.cpp
  69. +10 −7 src/jubavisor/jubavisor.hpp
  70. +18 −9 src/jubavisor/main.cpp
  71. +20 −0 src/plugin/fv_converter/ux_splitter.cpp
  72. +4 −1 src/plugin/fv_converter/ux_splitter_test.cpp
  73. +3 −0  src/recommender/euclid_lsh.cpp
  74. +2 −1  src/recommender/lsh.cpp
  75. +25 −17 src/regression/{pa.cpp → passive_aggressive.cpp}
  76. +8 −6 src/regression/{pa.hpp → passive_aggressive.hpp}
  77. +1 −1  src/regression/regression.hpp
  78. +4 −0 src/regression/regression_base.cpp
  79. +2 −0  src/regression/regression_base.hpp
  80. +4 −3 src/regression/regression_factory.cpp
  81. +3 −2 src/regression/regression_factory_test.cpp
  82. +18 −1 src/regression/regression_test.cpp
  83. +1 −1  src/regression/wscript
  84. +14 −10 src/server/anomaly_client.hpp
  85. +9 −9 src/server/anomaly_impl.cpp
  86. +1 −0  src/server/anomaly_serv.cpp
  87. +10 −1 src/server/anomaly_test.cpp
  88. +3 −0  src/server/classifier.idl
  89. +15 −6 src/server/classifier_client.hpp
  90. +10 −5 src/server/classifier_impl.cpp
  91. +2 −0  src/server/classifier_keeper.cpp
  92. +8 −0 src/server/classifier_serv.cpp
  93. +2 −0  src/server/classifier_serv.hpp
  94. +2 −0  src/server/classifier_server.hpp
  95. +13 −2 src/server/classifier_test.cpp
  96. +27 −23 src/server/graph_client.hpp
  97. +22 −22 src/server/graph_impl.cpp
  98. +1 −0  src/server/graph_serv.cpp
  99. +8 −0 src/server/graph_test.cpp
  100. +19 −15 src/server/recommender_client.hpp
  101. +14 −14 src/server/recommender_impl.cpp
  102. +11 −1 src/server/recommender_test.cpp
  103. +3 −0  src/server/regression.idl
  104. +15 −6 src/server/regression_client.hpp
  105. +10 −5 src/server/regression_impl.cpp
  106. +2 −0  src/server/regression_keeper.cpp
  107. +7 −0 src/server/regression_serv.cpp
  108. +2 −0  src/server/regression_serv.hpp
  109. +2 −0  src/server/regression_server.hpp
  110. +10 −1 src/server/regression_test.cpp
  111. +3 −0  src/server/stat.idl
  112. +20 −11 src/server/stat_client.hpp
  113. +15 −10 src/server/stat_impl.cpp
  114. +2 −0  src/server/stat_keeper.cpp
  115. +6 −0 src/server/stat_serv.cpp
  116. +2 −0  src/server/stat_serv.hpp
  117. +2 −0  src/server/stat_server.hpp
  118. +9 −0 src/server/stat_test.cpp
  119. +6 −5 src/server/test_util.hpp
  120. +4 −1 src/server/wscript
  121. +1 −5 src/stat/mixable_stat.cpp
  122. +5 −0 src/stat/stat.cpp
  123. +2 −0  src/stat/stat.hpp
  124. +13 −0 src/stat/stat_test.cpp
  125. +2 −2 src/storage/bit_index_storage.cpp
  126. +5 −4 src/storage/inverted_index_storage.cpp
  127. +6 −0 src/storage/local_storage.cpp
  128. +2 −0  src/storage/local_storage.hpp
  129. +7 −0 src/storage/local_storage_mixture.cpp
  130. +2 −0  src/storage/local_storage_mixture.hpp
  131. +6 −6 src/storage/lsh_index_storage.cpp
  132. +1 −1  src/storage/lsh_index_storage.hpp
  133. +3 −3 src/storage/lsh_vector.hpp
  134. +1 −1  src/storage/norm_l1.cpp
  135. +1 −1  src/storage/norm_l2.cpp
  136. +2 −2 src/storage/sparse_matrix_storage.cpp
  137. +2 −0  src/storage/storage_base.hpp
  138. +46 −1 src/storage/storage_test.cpp
  139. +5 −2 tools/codestyle/pre-commit
  140. +1 −1  tools/jenerator/README.rst
  141. +4 −1 tools/jenerator/src/OMakefile
  142. +1 −1  tools/jenerator/src/config.ml
  143. +13 −93 tools/jenerator/src/cpp.ml
  144. +4 −2 tools/jenerator/src/jdl_parser.mly
  145. +109 −0 tools/jenerator/src/lib.ml
  146. +3 −3 tools/jenerator/src/main.ml
  147. +252 −0 tools/jenerator/src/python.ml
  148. +309 −0 tools/jenerator/src/ruby.ml
  149. +1 −1  tools/packaging/allinone/jubapkg
  150. +7 −7 tools/packaging/allinone/jubapkg_version
  151. +0 −27 tools/packaging/homebrew/jubatus-mpio.rb
  152. +0 −31 tools/packaging/homebrew/jubatus-msgpack-rpc.rb
  153. +0 −86 tools/packaging/homebrew/jubatus.rb
  154. +0 −25 tools/packaging/homebrew/pficommon.rb
  155. +7 −7 tools/packaging/rpm/package-config
  156. +1 −1  tools/packaging/rpm/package.sh
  157. +8 −8 tools/packaging/rpm/rpmbuild/jubatus/SPECS/jubatus.spec.in
  158. +1 −1  tools/packaging/rpm/rpmbuild/pficommon/SPECS/pficommon.spec.in
  159. BIN  unittest_gtest.py
  160. +10 −5 wscript
View
6 .gitignore
@@ -16,4 +16,8 @@ callgrind.*
*.omakedb.lock
*.omc
*.cmi
-*.cmx
+*.cmx
+GPATH
+GRTAGS
+GSYMS
+GTAGS
View
233 ChangeLog.rst
@@ -0,0 +1,233 @@
+
+Release 0.4.2 - 2013/03/15
+--------------------------
+
+* Improvements
+ * Feature extraction configration supports exception rules (#253)
+ * Add 'clear' method for classifier, regression and stat (#200, #279)
+ * Keeper supports configuration of session pool (#266)
+ * Add 'get_client' method for each clients (related #244)
+ * Check if thread local variables are enable in configure (#283)
+ * Output logs when server started (#258)
+ * Output logs when server received signal (#208)
+
+* Bugfix
+ * fv_converter may revert wrong feature (#247)
+ * Fix PA update equation (#254)
+ * Fix CW update equation (#277)
+ * Segfaults when point-to-point (tap) interface is installed (#273)
+ * recommender/anomaly: does not call clear() for weight manager (#282)
+ * ux_splitter plug-in does not raise error when directory is specified for dict_path (#286)
+ * #229, #263, #267, #271, #278
+
+
+Release 0.4.1 - 2013/02/15
+--------------------------
+
+* Improvements
+ * New code generator 'jenerator' for framework users (#240)
+ * Applied coding rules based on Google C++ Style Guide
+ * jubaconv accepts v0.4.x configuration format (#223, #241)
+ * jubaconfig validates JSON syntax of configuration (#226, #245)
+ * server/keeper behaves more stably in distributed mode when failed to start listening (#201)
+ * pkg-config manifest for Jubatus clients (#228)
+
+* Bugfix
+ * jubastat returns min/max from values only the current window (#238, #242)
+ * #230, #231, #233, #234, #235, #237, #248
+
+
+Release 0.4.0 - 2013/01/11
+--------------------------
+
+* New machine learning service
+ * Distributed Anomaly Detection (jubaanomaly)
+ * Calculate anomaly measure value
+
+* Improvements
+ * Change RPC implementation to msgpack-rpc based (#27)
+ * [ATTENTION] Requires jubatus-mpio and jubatus-msgpack-rpc to install
+ * Add mpidl's output converter 'mpidlconv' (#210)
+ * Remove set_config API
+ * Standalone mode: specify config file using command option '-f, --configpath'
+ * Multinode mode: store config data to Zookeeper using jubaconfig (#164)
+ * More flexible configration (#38)
+ * Support hyper-parameters (#197)
+ * Commonize name of variables and functions (#203)
+ * Add or Change command options
+ * Add bind IP address option '-b, --listen_addr' (#152)
+ * Add bind network interfance option '-B, --listen_if' (#152, #214)
+ * Check if logging directory specified by '-l, --logdir' is writeable (#206)
+ * Add verbosity of log messages option '-e, --loglevel' (#207)
+ * Add configuration file option '-f, --configpath'
+ * Change '-d, --tmpdir' to '-d, --datadir' (#198)
+ * Improve logging
+ * Not separate log file for each log level (#207)
+ * Add start save/load logs (#195)
+ * Add many debug logs
+
+* Bugfix
+ * Client symbols may conflict because of using same namespace (#84)
+ * Fix shortest_path when target is found before reaching landmark (#177)
+ * Commonize RPC return types and values (#193)
+ * Segfaults when plugin throws JUBATUS_EXCEPTION (#211)
+ * Fix classifier AROW hyper-parameter conversion (#225)
+ * #86, #184, #204, #213, #219
+
+* Refactoring
+ * #186, #187, #191, #192, #199
+
+
+Release 0.3.4 - 2012/11/26
+--------------------------
+
+* Improvements
+ * Add --logdir option
+ * Add --enable-debug option to configure (#130)
+ * Catch bad cast of fv_converter (#170)
+
+* Bugfix
+ * Plugin basename specification does not work correctly (#57)
+ * MIX put_diff/get_diff and update/analyze RPC can be executed on the same time (#171)
+ * #121, #131, #136, #150, #155, #156, #157, #160, #163, #165, #167, #172, #179, #180
+
+
+Release 0.3.3 - 2012/10/29
+--------------------------
+
+* Improvements
+ * deb package (#14)
+ * Jubatus loads plugin from default directory (#57)
+ * Add hash_max_size option to learn in fixed-size memory (#67)
+ * OS X Homebrew packaging (#116)
+ * GCC compilation version <= 4.2 when zookeeper enabled (#60)
+ * Experimental support for Clang compilation (#100)
+ * Make the timeout smaller in unittest
+ * libmecab_splitter works well in multi-thread environment, and now only support mecab ver. 0.99 or later
+ * word_splitter::split method is now constant
+ * global_id_generator(standalone-mode) for graph, that supports 32 bit environment (#135)
+ * Use (document_frequency + 1) to calculate IDF weight to avoid inifinity
+
+* Bugfix
+ * #94, #104, #106, #108, #110, #111, #113, #114, #117, #118, #124, #126, #129, #133, #138, #139, #146, #148
+
+
+Release 0.3.2 - 2012/09/21
+--------------------------
+
+* Improvements
+ * jubavisor/jubactl support jubatus server options (#75)
+ * jubadoc: document generator (.idl => .rst) (#88)
+ * jenerator: enabled -o option to specify output directory
+ * yum (RPM) packaging (#40)
+
+* Bugfix
+ * #51, #76, #77, #79, #83, #90, #91, #96, #98, #99, #100, #101, #102, #103
+
+
+Release 0.3.1 - 2012/07/20
+--------------------------
+
+* Improvements
+ * RPC enhances to many exceptions and provide new error handling interface (#49)
+ * JSON interface for set_config APIs (#44)
+ * jubavisor close zk connection correctly (#74)
+
+* Bugfix
+ * #73, #69, #66, #65
+
+
+Release 0.3.0 - 2012/06/29
+--------------------------
+
+* Improvements
+ * Distributed Graph Processing
+ * Centrality computation
+ * Shortest path search
+ * New neighbor-search algorithm for recommender: minhash
+ * installs pkgconfig file (#42, jubatus.pc)
+ * jubavisor handling signal (#53)
+ * Exception handling and error outputs (#55)
+
+* Bugfix
+ * internal API get_storage implemented again (#21)
+ * Forgot ignoring signal in keeper #47
+ * #54, #45, #15
+
+
+Release 0.2.3 - 2012/06/08
+--------------------------
+
+* Improvements
+ * Asynchronous call to multiple servers at once, both keeper and mix - common/mprpc
+ * Refactor generator
+ * Error message improve
+ * Timeout in unittest expanded
+
+* Bugfix
+ * jubactl doesn't work ver 0.2 and later #13
+ * jubavisor doesn't work on daemon mode #5
+ * Asynchronous mprpc client critical bug
+ * #47, #50, #34, #36, #37, #31, #19, and other small bugfix
+
+
+Release 0.2.2 - 2012/04/06
+--------------------------
+
+* Improvements
+ * Simpler interfaces at classifier, regression and recommender
+ * Clients are *NOT COMPATIBLE* with previous releases
+ * Now mix works concurrently in multiple threads (except tf-idf counting)
+ * Asynchronous RPC to multiple servers at once
+ * Add --version option
+ * Interface description language changed from C++-like to Annotated MessagePack-IDL
+ * Minor error handling
+ * A bit more tested than previous releases
+
+* Bugfix
+ * #30, #29, #22
+
+
+Release 0.2.1 - 2012/03/13
+--------------------------
+
+* Bugfix
+ * #28
+
+
+Release 0.2.0 - 2012/02/16
+--------------------------
+
+* New Features
+ * recommender
+ * support fast similar item search, real-time update, distributed data management
+ * inverted index : exact result, fast search
+ * locality sensitive hash : approximate result, fast search, small working space
+ * regression
+ * online SVR using passive agressive algorithm
+ * as fast as current classifier
+ * stat
+ * a Key(string)-Value(queue<double>)
+ * O(1) cost of getting sum, standard deviation, max, min, statistic moments for each queue
+ * server framework
+ * less-tightly coupled distributed processing framework with each ML implementation
+ * idl & code generator - make it easy to write own jubatus system
+ * removed public release of client libraries (so easy to generate!)
+ * multiple mix - mutiple data objects can be mixed in one jubatus system
+
+* Bugfix
+ * duplicate key entry in fv_converter breaks the parameter
+
+
+Release 0.1.1 - 2011/11/15
+--------------------------
+
+Bugfix release
+
+
+Release 0.1.0 - 2011/10/26
+--------------------------
+
+Hello Jubatus!
+
+First release: including classifier, and mix operation
View
257 README.rst
@@ -3,250 +3,75 @@ Jubatus
The Jubatus library is an online machine learning framework which runs in distributed environment.
-See http://jubat.us for details.
+See http://jubat.us/ for details.
-QuickStart
-----------
+Quick Start
+-----------
-Jubatus officially supports Ubuntu >= 12.04 , Red Hat Enterprise Linux >= 6.2 . On other platforms, some may work if they have gcc >= 4.4 .
+We officially support Ubuntu Server 12.04 LTS (x86_64) and Red Hat Enterprise Linux 6.2 or later (x86_64).
-For minimal standalone mode, Jubatus requires pficommon >= 1.3.1 (commit 8fde51454af897cc971bab9033e217ff83b12f78 or later), google-glog , libmsgpack, jubatus-mpio, jubatus-msgpack-rpc, python >= 2.6 . Please install these software with headers before installation.
+See `QuickStart <http://jubat.us/en/quickstart.html>`_ for detailed description.
-::
-
- $ git clone git://github.com/jubatus/jubatus.git
- $ cd jubatus
- $ ./waf configure --disable-re2
- $ ./waf build
- $ sudo ./waf install
- $ jubaclassifier -f /usr/local/share/jubatus/example/config/classifier/pa.json
-
-Here Jubatus classifier server has started. Enjoy!
-
-License
--------
-
-LGPL 2.1
-
-Update history
---------------
-
-Release 0.4.1 2013/2/15
-~~~~~~~~~~~~~~~~~~~~~~
-
-Improvements
- - New code generator 'jenerator' for framework users (#240)
- - Applied coding rules based on Google C++ Style Guide
- - jubaconv accepts v0.4.x configuration format (#223, #241)
- - jubaconfig validates JSON syntax of configuration (#226, #245)
- - server/keeper behaves more stably in distributed mode when failed to start listening (#201)
- - pkg-config manifest for Jubatus clients (#228)
-
-Bugfix
- - jubastat returns min/max from values only the current window (#238, #242)
- - #230, #231, #233, #234, #235, #237, #248
-
-Release 0.4.0 2013/1/11
-~~~~~~~~~~~~~~~~~~~~~~~
-
-New machine learning service
- - Distributed Anomaly Detection (jubaanomaly)
-
- - Calculate anomaly measure value
-
-Improvements
- - Change RPC implementation to msgpack-rpc based (#27)
-
- - [ATTENTION] Requires jubatus-mpio and jubatus-msgpack-rpc to install
- - Add mpidl's output converter 'mpidlconv' (#210)
-
- - Remove set_config API
-
- - Standalone mode: specify config file using command option '-f, --configpath'
- - Multinode mode: store config data to Zookeeper using jubaconfig (#164)
-
- - More flexible configration (#38)
-
- - Support hyper-parameters (#197)
-
- - Commonize name of variables and functions (#203)
-
- - Add or Change command options
-
- - Add bind IP address option '-b, --listen_addr' (#152)
- - Add bind network interfance option '-B, --listen_if' (#152, #214)
- - Check if logging directory specified by '-l, --logdir' is writeable (#206)
- - Add verbosity of log messages option '-e, --loglevel' (#207)
- - Add configuration file option '-f, --configpath'
- - Change '-d, --tmpdir' to '-d, --datadir' (#198)
-
- - Improve logging
-
- - Not separate log file for each log level (#207)
- - Add start save/load logs (#195)
- - Add many debug logs
+Red Hat Enterprise Linux 6.2 or later (x86_64)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Bugfix
- - Client symbols may conflict because of using same namespace (#84)
- - Fix shortest_path when target is found before reaching landmark (#177)
- - Commonize RPC return types and values (#193)
- - Segfaults when plugin throws JUBATUS_EXCEPTION (#211)
- - Fix classifier AROW hyper-parameter conversion (#225)
- - #86, #184, #204, #213, #219
+Run the following command to register Jubatus Yum repository to the system.
-Refactoring
- - #186, #187, #191, #192, #199
-
-Release 0.3.4 2012/11/26
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-Improvements
- - Add --logdir option
- - Add --enable-debug option to configure (#130)
- - Catch bad cast of fv_converter (#170)
-
-Bugfix
- - Plugin basename specification does not work correctly (#57)
- - MIX put_diff/get_diff and update/analyze RPC can be executed on the same time (#171)
- - #121, #131, #136, #150, #155, #156, #157, #160, #163, #165, #167, #172, #179, #180
-
-Release 0.3.3 2012/10/29
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-Improvements
- - deb package (#14)
- - Jubatus loads plugin from default directory (#57)
- - Add hash_max_size option to learn in fixed-size memory (#67)
- - OS X Homebrew packaging (#116)
- - GCC compilation version <= 4.2 when zookeeper enabled (#60)
- - Experimental support for Clang compilation (#100)
- - Make the timeout smaller in unittest
- - libmecab_splitter works well in multi-thread environment, and now only support mecab ver. 0.99 or later
- - word_splitter::split method is now constant
- - global_id_generator(standalone-mode) for graph, that supports 32 bit environment (#135)
- - Use (document_frequency + 1) to calculate IDF weight to avoid inifinity
-
-Bugfix
- - #94, #104, #106, #108, #110, #111, #113, #114, #117, #118, #124, #126, #129, #133, #138, #139, #146, #148
-
-Release 0.3.2 2012/9/21
-~~~~~~~~~~~~~~~~~~~~~~~
-
-Improvements
- - jubavisor/jubactl support jubatus server options (#75)
- - jubadoc: document generator (.idl => .rst) (#88)
- - jenerator: enabled -o option to specify output directory
- - yum (RPM) packaging (#40)
-
-Bugfix
- - #51, #76, #77, #79, #83, #90, #91, #96, #98, #99, #100, #101, #102, #103
-
-Release 0.3.1 2012/7/20
-~~~~~~~~~~~~~~~~~~~~~~~
-
-Improvements
- - RPC enhances to many exceptions and provide new error handling interface (#49)
- - JSON interface for set_config APIs (#44)
- - jubavisor close zk connection correctly (#74)
-
-Bugfix
- - #73, #69, #66, #65
-
-Release 0.3.0 2012/6/29
-~~~~~~~~~~~~~~~~~~~~~~~
-
-Improvements
- - Distributed Graph Processing
-
- - Centrality computation
- - Shortest path search
-
- - New neighbor-search algorithm for recommender: minhash
- - installs pkgconfig file (#42, jubatus.pc)
- - jubavisor handling signal (#53)
- - Exception handling and error outputs (#55)
-
-Bugfix
- - internal API get_storage implemented again (#21)
- - Forgot ignoring signal in keeper #47
- - #54, #45, #15
+::
-Release 0.2.3 2012/6/8
-~~~~~~~~~~~~~~~~~~~~~~~
+ $ sudo rpm -Uvh http://download.jubat.us/yum/rhel/6/stable/x86_64/jubatus-release-6-1.el6.x86_64.rpm
-Improvements
- - Asynchronous call to multiple servers at once, both keeper and mix - common/mprpc
- - Refactor generator
- - Error message improve
- - Timeout in unittest expanded
+Then install ``jubatus`` and ``jubatus-client`` package.
-Bugfix
- - jubactl doesn't work ver 0.2 and later #13
- - jubavisor doesn't work on daemon mode #5
- - Asynchronous mprpc client critical bug
- - #47, #50, #34, #36, #37, #31, #19, and other small bugfix
+::
-Release 0.2.2 2012/4/6
-~~~~~~~~~~~~~~~~~~~~~~
+ $ sudo yum install jubatus jubatus-client
-Improvements
- - Simpler interfaces at classifier, regression and recommender
+Now Jubatus is installed in ``/usr/bin/juba*``.
- - Clients are *NOT COMPATIBLE* with previous releases
+::
- - Now mix works concurrently in multiple threads (except tf-idf counting)
- - Asynchronous RPC to multiple servers at once
- - Add --version option
- - Interface description language changed from C++-like to Annotated MessagePack-IDL
- - Minor error handling
- - A bit more tested than previous releases
+ $ jubaclassifier -f /usr/share/jubatus/example/config/classifier/pa.json
-Bugfix
- - #30, #29, #22
+Ubuntu Server 12.04 LTS (x86_64)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Release 0.2.1 2012/3/13
-~~~~~~~~~~~~~~~~~~~~~~~
+Write the following line to ``/etc/apt/sources.list.d/jubatus.list`` to register Jubatus Apt repository to the system.
-Bugfix release: #28
+::
-Release 0.2.0 2012/2/16
-~~~~~~~~~~~~~~~~~~~~~~~
+ deb http://download.jubat.us/apt binary/
-New Features
- - recommender
+Now install ``jubatus`` package.
- - support fast similar item search, real-time update, distributed data management
- - inverted index : exact result, fast search
- - locality sensitive hash : approximate result, fast search, small working space
+::
- - regression
+ $ sudo apt-get update
+ $ sudo apt-get install -y --force-yes jubatus
- - online SVR using passive agressive algorithm
- - as fast as current classifier
+Now Jubatus is installed in ``/opt/jubatus/bin/juba*``.
- - stat
+::
- - a Key(string)-Value(queue<double>)
- - O(1) cost of getting sum, standard deviation, max, min, statistic moments for each queue
+ $ source /opt/jubatus/profile
+ $ jubaclassifier -f /opt/jubatus/share/jubatus/example/config/classifier/pa.json
- - server framework
+Other Platforms
+~~~~~~~~~~~~~~~
- - less-tightly coupled distributed processing framework with each ML implementation
- - idl & code generator - make it easy to write own jubatus system
- - removed public release of client libraries (so easy to generate!)
- - multiple mix - mutiple data objects can be mixed in one jubatus system
+For other platforms, refer to the `documentation <http://jubat.us/en/build.html>`_.
-Bugfix
- - duplicate key entry in fv_converter breaks the parameter
+License
+-------
-Release 0.1.1 2011/11/15
-~~~~~~~~~~~~~~~~~~~~~~~~
+LGPL 2.1
-Bugfix release
+Update history
+--------------
-Release 0.1.0 2011/10/26
-~~~~~~~~~~~~~~~~~~~~~~~~
+Update history can be found from `ChangeLog <https://github.com/jubatus/jubatus/blob/master/ChangeLog.rst>`_ or `WikiPage <https://github.com/jubatus/jubatus/wiki/ChangeLog>`_.
-Hello Jubatus!
+Contributors
+------------
-First release: including classifier, and mix operation
+Patches contributed by `those people <https://github.com/jubatus/jubatus/contributors>`_.
View
24 client/anomaly_client.hpp
@@ -21,58 +21,62 @@ class anomaly {
: c_(host, port) {
c_.set_timeout(timeout_sec);
}
-
+
std::string get_config(std::string name) {
msgpack::rpc::future f = c_.call("get_config", name);
return f.get<std::string>();
}
-
+
bool clear_row(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("clear_row", name, id);
return f.get<bool>();
}
-
+
std::pair<std::string, float> add(std::string name, datum row) {
msgpack::rpc::future f = c_.call("add", name, row);
return f.get<std::pair<std::string, float> >();
}
-
+
float update(std::string name, std::string id, datum row) {
msgpack::rpc::future f = c_.call("update", name, id, row);
return f.get<float>();
}
-
+
bool clear(std::string name) {
msgpack::rpc::future f = c_.call("clear", name);
return f.get<bool>();
}
-
+
float calc_score(std::string name, datum row) {
msgpack::rpc::future f = c_.call("calc_score", name, row);
return f.get<float>();
}
-
+
std::vector<std::string> get_all_rows(std::string name) {
msgpack::rpc::future f = c_.call("get_all_rows", name);
return f.get<std::vector<std::string> >();
}
-
+
bool save(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("save", name, id);
return f.get<bool>();
}
-
+
bool load(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("load", name, id);
return f.get<bool>();
}
-
+
std::map<std::string, std::map<std::string, std::string> > get_status(
std::string name) {
msgpack::rpc::future f = c_.call("get_status", name);
return f.get<std::map<std::string, std::map<std::string, std::string> > >();
}
+ msgpack::rpc::client& get_client() {
+ return c_;
+ }
+
private:
msgpack::rpc::client c_;
};
View
34 client/anomaly_types.hpp
@@ -1,37 +1,29 @@
-
// This file is auto-generated from anomaly.idl
// *** DO NOT EDIT ***
-#ifndef ANOMALY_TYPES_HPP_
-#define ANOMALY_TYPES_HPP_
+#ifndef JUBATUS_ANOMALY_TYPES_HPP_
+#define JUBATUS_ANOMALY_TYPES_HPP_
+#include <stdint.h>
-#include <vector>
#include <map>
#include <string>
-#include <stdexcept>
-#include <stdint.h>
-#include <msgpack.hpp>
+#include <vector>
+#include <utility>
+#include <msgpack.hpp>
namespace jubatus {
-
namespace anomaly {
struct datum {
-public:
-
-
- MSGPACK_DEFINE(string_values, num_values);
-
- std::vector<std::pair<std::string, std::string > > string_values;
- std::vector<std::pair<std::string, double > > num_values;
+ public:
+ MSGPACK_DEFINE(string_values, num_values);
+ std::vector<std::pair<std::string, std::string> > string_values;
+ std::vector<std::pair<std::string, double> > num_values;
};
-} // namespace anomaly
-
-} // namespace jubatus
-
-
+} // namespace anomaly
+} // namespace jubatus
-#endif // ANOMALY_TYPES_HPP_
+#endif // JUBATUS_ANOMALY_TYPES_HPP_
View
21 client/classifier_client.hpp
@@ -21,40 +21,49 @@ class classifier {
: c_(host, port) {
c_.set_timeout(timeout_sec);
}
-
+
std::string get_config(std::string name) {
msgpack::rpc::future f = c_.call("get_config", name);
return f.get<std::string>();
}
-
+
int32_t train(std::string name, std::vector<std::pair<std::string,
datum> > data) {
msgpack::rpc::future f = c_.call("train", name, data);
return f.get<int32_t>();
}
-
+
std::vector<std::vector<estimate_result> > classify(std::string name,
std::vector<datum> data) {
msgpack::rpc::future f = c_.call("classify", name, data);
return f.get<std::vector<std::vector<estimate_result> > >();
}
-
+
+ bool clear(std::string name) {
+ msgpack::rpc::future f = c_.call("clear", name);
+ return f.get<bool>();
+ }
+
bool save(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("save", name, id);
return f.get<bool>();
}
-
+
bool load(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("load", name, id);
return f.get<bool>();
}
-
+
std::map<std::string, std::map<std::string, std::string> > get_status(
std::string name) {
msgpack::rpc::future f = c_.call("get_status", name);
return f.get<std::map<std::string, std::map<std::string, std::string> > >();
}
+ msgpack::rpc::client& get_client() {
+ return c_;
+ }
+
private:
msgpack::rpc::client c_;
};
View
41 client/classifier_types.hpp
@@ -1,47 +1,36 @@
-
// This file is auto-generated from classifier.idl
// *** DO NOT EDIT ***
-#ifndef CLASSIFIER_TYPES_HPP_
-#define CLASSIFIER_TYPES_HPP_
+#ifndef JUBATUS_CLASSIFIER_TYPES_HPP_
+#define JUBATUS_CLASSIFIER_TYPES_HPP_
+#include <stdint.h>
-#include <vector>
#include <map>
#include <string>
-#include <stdexcept>
-#include <stdint.h>
-#include <msgpack.hpp>
+#include <vector>
+#include <utility>
+#include <msgpack.hpp>
namespace jubatus {
-
namespace classifier {
struct datum {
-public:
-
-
- MSGPACK_DEFINE(string_values, num_values);
-
- std::vector<std::pair<std::string, std::string > > string_values;
- std::vector<std::pair<std::string, double > > num_values;
+ public:
+ MSGPACK_DEFINE(string_values, num_values);
+ std::vector<std::pair<std::string, std::string> > string_values;
+ std::vector<std::pair<std::string, double> > num_values;
};
struct estimate_result {
-public:
-
-
- MSGPACK_DEFINE(label, score);
-
+ public:
+ MSGPACK_DEFINE(label, score);
std::string label;
double score;
};
-} // namespace classifier
-
-} // namespace jubatus
-
-
+} // namespace classifier
+} // namespace jubatus
-#endif // CLASSIFIER_TYPES_HPP_
+#endif // JUBATUS_CLASSIFIER_TYPES_HPP_
View
50 client/graph_client.hpp
@@ -21,128 +21,132 @@ class graph {
: c_(host, port) {
c_.set_timeout(timeout_sec);
}
-
+
std::string get_config(std::string name) {
msgpack::rpc::future f = c_.call("get_config", name);
return f.get<std::string>();
}
-
+
std::string create_node(std::string name) {
msgpack::rpc::future f = c_.call("create_node", name);
return f.get<std::string>();
}
-
+
bool remove_node(std::string name, std::string node_id) {
msgpack::rpc::future f = c_.call("remove_node", name, node_id);
return f.get<bool>();
}
-
+
bool update_node(std::string name, std::string node_id, std::map<std::string,
std::string> property) {
msgpack::rpc::future f = c_.call("update_node", name, node_id, property);
return f.get<bool>();
}
-
+
uint64_t create_edge(std::string name, std::string node_id, edge e) {
msgpack::rpc::future f = c_.call("create_edge", name, node_id, e);
return f.get<uint64_t>();
}
-
+
bool update_edge(std::string name, std::string node_id, uint64_t edge_id,
edge e) {
msgpack::rpc::future f = c_.call("update_edge", name, node_id, edge_id, e);
return f.get<bool>();
}
-
+
bool remove_edge(std::string name, std::string node_id, uint64_t edge_id) {
msgpack::rpc::future f = c_.call("remove_edge", name, node_id, edge_id);
return f.get<bool>();
}
-
+
double get_centrality(std::string name, std::string node_id,
int32_t centrality_type, preset_query query) {
msgpack::rpc::future f = c_.call("get_centrality", name, node_id,
centrality_type, query);
return f.get<double>();
}
-
+
bool add_centrality_query(std::string name, preset_query query) {
msgpack::rpc::future f = c_.call("add_centrality_query", name, query);
return f.get<bool>();
}
-
+
bool add_shortest_path_query(std::string name, preset_query query) {
msgpack::rpc::future f = c_.call("add_shortest_path_query", name, query);
return f.get<bool>();
}
-
+
bool remove_centrality_query(std::string name, preset_query query) {
msgpack::rpc::future f = c_.call("remove_centrality_query", name, query);
return f.get<bool>();
}
-
+
bool remove_shortest_path_query(std::string name, preset_query query) {
msgpack::rpc::future f = c_.call("remove_shortest_path_query", name, query);
return f.get<bool>();
}
-
+
std::vector<std::string> get_shortest_path(std::string name,
shortest_path_query query) {
msgpack::rpc::future f = c_.call("get_shortest_path", name, query);
return f.get<std::vector<std::string> >();
}
-
+
bool update_index(std::string name) {
msgpack::rpc::future f = c_.call("update_index", name);
return f.get<bool>();
}
-
+
bool clear(std::string name) {
msgpack::rpc::future f = c_.call("clear", name);
return f.get<bool>();
}
-
+
node get_node(std::string name, std::string node_id) {
msgpack::rpc::future f = c_.call("get_node", name, node_id);
return f.get<node>();
}
-
+
edge get_edge(std::string name, std::string node_id, uint64_t edge_id) {
msgpack::rpc::future f = c_.call("get_edge", name, node_id, edge_id);
return f.get<edge>();
}
-
+
bool save(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("save", name, id);
return f.get<bool>();
}
-
+
bool load(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("load", name, id);
return f.get<bool>();
}
-
+
std::map<std::string, std::map<std::string, std::string> > get_status(
std::string name) {
msgpack::rpc::future f = c_.call("get_status", name);
return f.get<std::map<std::string, std::map<std::string, std::string> > >();
}
-
+
bool create_node_here(std::string name, std::string node_id) {
msgpack::rpc::future f = c_.call("create_node_here", name, node_id);
return f.get<bool>();
}
-
+
bool remove_global_node(std::string name, std::string node_id) {
msgpack::rpc::future f = c_.call("remove_global_node", name, node_id);
return f.get<bool>();
}
-
+
bool create_edge_here(std::string name, uint64_t edge_id, edge e) {
msgpack::rpc::future f = c_.call("create_edge_here", name, edge_id, e);
return f.get<bool>();
}
+ msgpack::rpc::client& get_client() {
+ return c_;
+ }
+
private:
msgpack::rpc::client c_;
};
View
63 client/graph_types.hpp
@@ -1,71 +1,54 @@
-
// This file is auto-generated from graph.idl
// *** DO NOT EDIT ***
-#ifndef GRAPH_TYPES_HPP_
-#define GRAPH_TYPES_HPP_
+#ifndef JUBATUS_GRAPH_TYPES_HPP_
+#define JUBATUS_GRAPH_TYPES_HPP_
+#include <stdint.h>
-#include <vector>
#include <map>
#include <string>
-#include <stdexcept>
-#include <stdint.h>
-#include <msgpack.hpp>
+#include <vector>
+#include <utility>
+#include <msgpack.hpp>
namespace jubatus {
-
namespace graph {
struct node {
-public:
-
-
- MSGPACK_DEFINE(property, in_edges, out_edges);
-
- std::map<std::string, std::string > property;
- std::vector<uint64_t > in_edges;
- std::vector<uint64_t > out_edges;
+ public:
+ MSGPACK_DEFINE(property, in_edges, out_edges);
+ std::map<std::string, std::string> property;
+ std::vector<uint64_t> in_edges;
+ std::vector<uint64_t> out_edges;
};
struct preset_query {
-public:
-
-
- MSGPACK_DEFINE(edge_query, node_query);
-
- std::vector<std::pair<std::string, std::string > > edge_query;
- std::vector<std::pair<std::string, std::string > > node_query;
+ public:
+ MSGPACK_DEFINE(edge_query, node_query);
+ std::vector<std::pair<std::string, std::string> > edge_query;
+ std::vector<std::pair<std::string, std::string> > node_query;
};
struct edge {
-public:
-
-
- MSGPACK_DEFINE(property, source, target);
-
- std::map<std::string, std::string > property;
+ public:
+ MSGPACK_DEFINE(property, source, target);
+ std::map<std::string, std::string> property;
std::string source;
std::string target;
};
struct shortest_path_query {
-public:
-
-
- MSGPACK_DEFINE(source, target, max_hop, query);
-
+ public:
+ MSGPACK_DEFINE(source, target, max_hop, query);
std::string source;
std::string target;
uint32_t max_hop;
preset_query query;
};
-} // namespace graph
-
-} // namespace jubatus
-
-
+} // namespace graph
+} // namespace jubatus
-#endif // GRAPH_TYPES_HPP_
+#endif // JUBATUS_GRAPH_TYPES_HPP_
View
34 client/recommender_client.hpp
@@ -21,85 +21,89 @@ class recommender {
: c_(host, port) {
c_.set_timeout(timeout_sec);
}
-
+
std::string get_config(std::string name) {
msgpack::rpc::future f = c_.call("get_config", name);
return f.get<std::string>();
}
-
+
bool clear_row(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("clear_row", name, id);
return f.get<bool>();
}
-
+
bool update_row(std::string name, std::string id, datum row) {
msgpack::rpc::future f = c_.call("update_row", name, id, row);
return f.get<bool>();
}
-
+
bool clear(std::string name) {
msgpack::rpc::future f = c_.call("clear", name);
return f.get<bool>();
}
-
+
datum complete_row_from_id(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("complete_row_from_id", name, id);
return f.get<datum>();
}
-
+
datum complete_row_from_datum(std::string name, datum row) {
msgpack::rpc::future f = c_.call("complete_row_from_datum", name, row);
return f.get<datum>();
}
-
+
similar_result similar_row_from_id(std::string name, std::string id,
uint32_t size) {
msgpack::rpc::future f = c_.call("similar_row_from_id", name, id, size);
return f.get<similar_result>();
}
-
+
similar_result similar_row_from_datum(std::string name, datum row,
uint32_t size) {
msgpack::rpc::future f = c_.call("similar_row_from_datum", name, row, size);
return f.get<similar_result>();
}
-
+
datum decode_row(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("decode_row", name, id);
return f.get<datum>();
}
-
+
std::vector<std::string> get_all_rows(std::string name) {
msgpack::rpc::future f = c_.call("get_all_rows", name);
return f.get<std::vector<std::string> >();
}
-
+
float calc_similarity(std::string name, datum lhs, datum rhs) {
msgpack::rpc::future f = c_.call("calc_similarity", name, lhs, rhs);
return f.get<float>();
}
-
+
float calc_l2norm(std::string name, datum row) {
msgpack::rpc::future f = c_.call("calc_l2norm", name, row);
return f.get<float>();
}
-
+
bool save(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("save", name, id);
return f.get<bool>();
}
-
+
bool load(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("load", name, id);
return f.get<bool>();
}
-
+
std::map<std::string, std::map<std::string, std::string> > get_status(
std::string name) {
msgpack::rpc::future f = c_.call("get_status", name);
return f.get<std::map<std::string, std::map<std::string, std::string> > >();
}
+ msgpack::rpc::client& get_client() {
+ return c_;
+ }
+
private:
msgpack::rpc::client c_;
};
View
36 client/recommender_types.hpp
@@ -1,39 +1,31 @@
-
// This file is auto-generated from recommender.idl
// *** DO NOT EDIT ***
-#ifndef RECOMMENDER_TYPES_HPP_
-#define RECOMMENDER_TYPES_HPP_
+#ifndef JUBATUS_RECOMMENDER_TYPES_HPP_
+#define JUBATUS_RECOMMENDER_TYPES_HPP_
+#include <stdint.h>
-#include <vector>
#include <map>
#include <string>
-#include <stdexcept>
-#include <stdint.h>
-#include <msgpack.hpp>
+#include <vector>
+#include <utility>
+#include <msgpack.hpp>
namespace jubatus {
-
namespace recommender {
-typedef std::vector<std::pair<std::string, float > > similar_result;
+typedef std::vector<std::pair<std::string, float> > similar_result;
struct datum {
-public:
-
-
- MSGPACK_DEFINE(string_values, num_values);
-
- std::vector<std::pair<std::string, std::string > > string_values;
- std::vector<std::pair<std::string, double > > num_values;
+ public:
+ MSGPACK_DEFINE(string_values, num_values);
+ std::vector<std::pair<std::string, std::string> > string_values;
+ std::vector<std::pair<std::string, double> > num_values;
};
-} // namespace recommender
-
-} // namespace jubatus
-
-
+} // namespace recommender
+} // namespace jubatus
-#endif // RECOMMENDER_TYPES_HPP_
+#endif // JUBATUS_RECOMMENDER_TYPES_HPP_
View
21 client/regression_client.hpp
@@ -21,40 +21,49 @@ class regression {
: c_(host, port) {
c_.set_timeout(timeout_sec);
}
-
+
std::string get_config(std::string name) {
msgpack::rpc::future f = c_.call("get_config", name);
return f.get<std::string>();
}
-
+
int32_t train(std::string name, std::vector<std::pair<float,
datum> > train_data) {
msgpack::rpc::future f = c_.call("train", name, train_data);
return f.get<int32_t>();
}
-
+
std::vector<float> estimate(std::string name,
std::vector<datum> estimate_data) {
msgpack::rpc::future f = c_.call("estimate", name, estimate_data);
return f.get<std::vector<float> >();
}
-
+
+ bool clear(std::string name) {
+ msgpack::rpc::future f = c_.call("clear", name);
+ return f.get<bool>();
+ }
+
bool save(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("save", name, id);
return f.get<bool>();
}
-
+
bool load(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("load", name, id);
return f.get<bool>();
}
-
+
std::map<std::string, std::map<std::string, std::string> > get_status(
std::string name) {
msgpack::rpc::future f = c_.call("get_status", name);
return f.get<std::map<std::string, std::map<std::string, std::string> > >();
}
+ msgpack::rpc::client& get_client() {
+ return c_;
+ }
+
private:
msgpack::rpc::client c_;
};
View
34 client/regression_types.hpp
@@ -1,37 +1,29 @@
-
// This file is auto-generated from regression.idl
// *** DO NOT EDIT ***
-#ifndef REGRESSION_TYPES_HPP_
-#define REGRESSION_TYPES_HPP_
+#ifndef JUBATUS_REGRESSION_TYPES_HPP_
+#define JUBATUS_REGRESSION_TYPES_HPP_
+#include <stdint.h>
-#include <vector>
#include <map>
#include <string>
-#include <stdexcept>
-#include <stdint.h>
-#include <msgpack.hpp>
+#include <vector>
+#include <utility>
+#include <msgpack.hpp>
namespace jubatus {
-
namespace regression {
struct datum {
-public:
-
-
- MSGPACK_DEFINE(string_values, num_values);
-
- std::vector<std::pair<std::string, std::string > > string_values;
- std::vector<std::pair<std::string, double > > num_values;
+ public:
+ MSGPACK_DEFINE(string_values, num_values);
+ std::vector<std::pair<std::string, std::string> > string_values;
+ std::vector<std::pair<std::string, double> > num_values;
};
-} // namespace regression
-
-} // namespace jubatus
-
-
+} // namespace regression
+} // namespace jubatus
-#endif // REGRESSION_TYPES_HPP_
+#endif // JUBATUS_REGRESSION_TYPES_HPP_
View
31 client/stat_client.hpp
@@ -21,64 +21,73 @@ class stat {
: c_(host, port) {
c_.set_timeout(timeout_sec);
}
-
+
std::string get_config(std::string name) {
msgpack::rpc::future f = c_.call("get_config", name);
return f.get<std::string>();
}
-
+
bool push(std::string name, std::string key, double value) {
msgpack::rpc::future f = c_.call("push", name, key, value);
return f.get<bool>();
}
-
+
double sum(std::string name, std::string key) {
msgpack::rpc::future f = c_.call("sum", name, key);
return f.get<double>();
}
-
+
double stddev(std::string name, std::string key) {
msgpack::rpc::future f = c_.call("stddev", name, key);
return f.get<double>();
}
-
+
double max(std::string name, std::string key) {
msgpack::rpc::future f = c_.call("max", name, key);
return f.get<double>();
}
-
+
double min(std::string name, std::string key) {
msgpack::rpc::future f = c_.call("min", name, key);
return f.get<double>();
}
-
+
double entropy(std::string name, std::string key) {
msgpack::rpc::future f = c_.call("entropy", name, key);
return f.get<double>();
}
-
+
double moment(std::string name, std::string key, int32_t degree,
double center) {
msgpack::rpc::future f = c_.call("moment", name, key, degree, center);
return f.get<double>();
}
-
+
+ bool clear(std::string name) {
+ msgpack::rpc::future f = c_.call("clear", name);
+ return f.get<bool>();
+ }
+
bool save(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("save", name, id);
return f.get<bool>();
}
-
+
bool load(std::string name, std::string id) {
msgpack::rpc::future f = c_.call("load", name, id);
return f.get<bool>();
}
-
+
std::map<std::string, std::map<std::string, std::string> > get_status(
std::string name) {
msgpack::rpc::future f = c_.call("get_status", name);
return f.get<std::map<std::string, std::map<std::string, std::string> > >();
}
+ msgpack::rpc::client& get_client() {
+ return c_;
+ }
+
private:
msgpack::rpc::client c_;
};
View
23 client/stat_types.hpp
@@ -1,27 +1,22 @@
-
// This file is auto-generated from stat.idl
// *** DO NOT EDIT ***
-#ifndef STAT_TYPES_HPP_
-#define STAT_TYPES_HPP_
+#ifndef JUBATUS_STAT_TYPES_HPP_
+#define JUBATUS_STAT_TYPES_HPP_
+#include <stdint.h>
-#include <vector>
#include <map>
#include <string>
-#include <stdexcept>
-#include <stdint.h>
-#include <msgpack.hpp>
+#include <vector>
+#include <utility>
+#include <msgpack.hpp>
namespace jubatus {
-
namespace stat {
-} // namespace stat
-
-} // namespace jubatus
-
-
+} // namespace stat
+} // namespace jubatus
-#endif // STAT_TYPES_HPP_
+#endif // JUBATUS_STAT_TYPES_HPP_
View
4 src/anomaly/lof_storage.cpp
@@ -116,8 +116,8 @@ void lof_storage::remove_row(const string& row) {
}
void lof_storage::clear() {
- lof_table_.clear();
- lof_table_diff_.clear();
+ lof_table_t().swap(lof_table_);
+ lof_table_t().swap(lof_table_diff_);
nn_engine_->clear();
}
View
16 src/classifier/arow.cpp
@@ -27,18 +27,18 @@ using std::string;
namespace jubatus {
namespace classifier {
-AROW::AROW(storage::storage_base* storage)
+arow::arow(storage::storage_base* storage)
: classifier_base(storage) {
classifier_base::use_covars_ = true;
}
-AROW::AROW(const classifier_config& config, storage::storage_base* storage)
+arow::arow(const classifier_config& config, storage::storage_base* storage)
: classifier_base(storage),
- config(config) {
+ config_(config) {
classifier_base::use_covars_ = true;
}
-void AROW::train(const sfv_t& sfv, const string& label) {
+void arow::train(const sfv_t& sfv, const string& label) {
string incorrect_label;
float variance = 0.f;
float margin = -calc_margin_and_variance(sfv, label, incorrect_label,
@@ -47,12 +47,12 @@ void AROW::train(const sfv_t& sfv, const string& label) {
return;
}
- float beta = 1.f / (variance + 1.f / config.C);
+ float beta = 1.f / (variance + 1.f / config_.C);
float alpha = (1.f - margin) * beta; // max(0, 1 - margin) = 1 - margin
update(sfv, alpha, beta, label, incorrect_label);
}
-void AROW::update(
+void arow::update(
const sfv_t& sfv,
float alpha,
float beta,
@@ -85,8 +85,8 @@ void AROW::update(
}
}
-string AROW::name() const {
- return string("AROW");
+string arow::name() const {
+ return string("arow");
}
} // namespace classifier
View
8 src/classifier/arow.hpp
@@ -24,10 +24,10 @@
namespace jubatus {
namespace classifier {
-class AROW : public classifier_base {
+class arow : public classifier_base {
public:
- explicit AROW(storage::storage_base* stroage);
- AROW(const classifier_config& config, storage::storage_base* stroage);
+ explicit arow(storage::storage_base* stroage);
+ arow(const classifier_config& config, storage::storage_base* stroage);
void train(const sfv_t& fv, const std::string& label);
std::string name() const;
private:
@@ -37,7 +37,7 @@ class AROW : public classifier_base {
float beta,
const std::string& pos_label,
const std::string& neg_label);
- classifier_config config;
+ classifier_config config_;
};
} // namespace classifier
View
10 src/classifier/classifier.hpp
@@ -19,11 +19,11 @@
#include "classifier_base.hpp"
#include "perceptron.hpp"
-#include "pa.hpp"
-#include "pa1.hpp"
-#include "pa2.hpp"
-#include "cw.hpp"
+#include "passive_aggressive.hpp"
+#include "passive_aggressive_1.hpp"
+#include "passive_aggressive_2.hpp"
+#include "confidence_weighted.hpp"
#include "arow.hpp"
-#include "nherd.hpp"
+#include "normal_herd.hpp"
#endif // JUBATUS_CLASSIFIER_CLASSIFIER_HPP_
View
4 src/classifier/classifier_base.cpp
@@ -70,6 +70,10 @@ string classifier_base::classify(const sfv_t& fv) const {
return max_class;
}
+void classifier_base::clear() {
+ storage_->clear();
+}
+
void classifier_base::update_weight(
const sfv_t& sfv,
float step_width,
View
2  src/classifier/classifier_base.hpp
@@ -40,6 +40,8 @@ class classifier_base {
std::string classify(const sfv_t& fv) const;
void classify_with_scores(const sfv_t& fv, classify_result& scores) const;
+ void clear();
+
virtual std::string name() const = 0;
protected:
View
30 src/classifier/classifier_factory.cpp
@@ -35,19 +35,23 @@ classifier_base* classifier_factory::create_classifier(
if (name == "perceptron") {
// perceptron doesn't have parameter
return new perceptron(storage);
- } else if (name == "PA") {
- // PA doesn't have parameter
- return new PA(storage);
- } else if (name == "PA1") {
- return new PA1(config_cast_check<classifier_config>(param), storage);
- } else if (name == "PA2") {
- return new PA2(config_cast_check<classifier_config>(param), storage);
- } else if (name == "CW") {
- return new CW(config_cast_check<classifier_config>(param), storage);
- } else if (name == "AROW") {
- return new AROW(config_cast_check<classifier_config>(param), storage);
- } else if (name == "NHERD") {
- return new NHERD(config_cast_check<classifier_config>(param), storage);
+ } else if (name == "PA" || name == "passive_aggressive") {
+ // passive_aggressive doesn't have parameter
+ return new passive_aggressive(storage);
+ } else if (name == "PA1" || name == "passive_aggressive_1") {
+ return new passive_aggressive_1(
+ config_cast_check<classifier_config>(param), storage);
+ } else if (name == "PA2" || name == "passive_aggressive_2") {
+ return new passive_aggressive_2(
+ config_cast_check<classifier_config>(param), storage);
+ } else if (name == "CW" || name == "confidence_weighted") {
+ return new confidence_weighted(
+ config_cast_check<classifier_config>(param), storage);
+ } else if (name == "AROW" || name == "arow") {
+ return new arow(config_cast_check<classifier_config>(param), storage);
+ } else if (name == "NHERD" || name == "normal_herd") {
+ return new normal_herd(
+ config_cast_check<classifier_config>(param), storage);
} else {
throw JUBATUS_EXCEPTION(unsupported_method(name));
}
View
21 src/classifier/classifier_test.cpp
@@ -59,6 +59,11 @@ TYPED_TEST_P(classifier_test, trivial) {
classify_result scores;
p.classify_with_scores(fv, scores);
ASSERT_EQ(2u, scores.size());
+
+ p.clear();
+
+ p.classify_with_scores(fv, scores);
+ ASSERT_EQ(0u, scores.size());
}
TYPED_TEST_P(classifier_test, sfv_err) {
@@ -132,7 +137,9 @@ REGISTER_TYPED_TEST_CASE_P(
random,
random3);
-typedef testing::Types<perceptron, PA, PA1, PA2, CW, AROW, NHERD>
+typedef testing::Types<
+ perceptron, passive_aggressive, passive_aggressive_1, passive_aggressive_2,
+ confidence_weighted, arow, normal_herd>
classifier_types;
INSTANTIATE_TYPED_TEST_CASE_P(cl, classifier_test, classifier_types);
@@ -143,13 +150,17 @@ void InitClassifiers(vector<classifier_base*>& classifiers) {
classifier_factory::create_classifier("perceptron", param,
new local_storage));
classifiers.push_back(
- classifier_factory::create_classifier("PA", param, new local_storage));
+ classifier_factory::create_classifier(
+ "passive_aggressive", param, new local_storage));
classifiers.push_back(
- classifier_factory::create_classifier("PA1", param, new local_storage));
+ classifier_factory::create_classifier(
+ "passive_aggressive_1", param, new local_storage));
classifiers.push_back(
- classifier_factory::create_classifier("PA2", param, new local_storage));
+ classifier_factory::create_classifier(
+ "passive_aggressive_2", param, new local_storage));
classifiers.push_back(
- classifier_factory::create_classifier("CW", param, new local_storage));
+ classifier_factory::create_classifier(
+ "confidence_weighted", param, new local_storage));
classifiers.push_back(
classifier_factory::create_classifier("AROW", param, new local_storage));
classifiers.push_back(
View
26 src/classifier/cw.cpp → src/classifier/confidence_weighted.cpp
@@ -14,7 +14,7 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include "cw.hpp"
+#include "confidence_weighted.hpp"
#include <algorithm>
#include <cmath>
@@ -27,19 +27,21 @@ using std::string;
namespace jubatus {
namespace classifier {
-CW::CW(storage::storage_base* storage)
+confidence_weighted::confidence_weighted(storage::storage_base* storage)
: classifier_base(storage) {
classifier_base::use_covars_ = true;
}
-CW::CW(const classifier_config& config, storage::storage_base* storage)
+confidence_weighted::confidence_weighted(
+ const classifier_config& config,
+ storage::storage_base* storage)
: classifier_base(storage),
- config(config) {
+ config_(config) {
classifier_base::use_covars_ = true;
}
-void CW::train(const sfv_t& sfv, const string& label) {
- const float C = config.C;
+void confidence_weighted::train(const sfv_t& sfv, const string& label) {
+ const float C = config_.C;
string incorrect_label;
float variance = 0.f;
float margin = -calc_margin_and_variance(sfv, label, incorrect_label,
@@ -54,7 +56,7 @@ void CW::train(const sfv_t& sfv, const string& label) {
update(sfv, gamma, label, incorrect_label);
}
-void CW::update(
+void confidence_weighted::update(
const sfv_t& sfv,
float step_width,
const string& pos_label,
@@ -69,9 +71,9 @@ void CW::update(
storage::val2_t neg_val(0.f, 1.f);
ClassifierUtil::get_two(val2, pos_label, neg_label, pos_val, neg_val);
- const float C = config.C;
- float covar_pos_step = 2.f * step_width * pos_val.v2 * val * val * C;
- float covar_neg_step = 2.f * step_width * neg_val.v2 * val * val * C;
+ const float C = config_.C;
+ float covar_pos_step = 2.f * step_width * val * val * C;
+ float covar_neg_step = 2.f * step_width * val * val * C;
storage_->set2(
feature,
@@ -88,8 +90,8 @@ void CW::update(
}
}
-string CW::name() const {
- return string("CW");
+string confidence_weighted::name() const {
+ return string("confidence_weighted");
}
} // namespace classifier
View
16 src/classifier/cw.hpp → src/classifier/confidence_weighted.hpp
@@ -14,8 +14,8 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#ifndef JUBATUS_CLASSIFIER_CW_HPP_
-#define JUBATUS_CLASSIFIER_CW_HPP_
+#ifndef JUBATUS_CLASSIFIER_CONFIDENCE_WEIGHTED_HPP_
+#define JUBATUS_CLASSIFIER_CONFIDENCE_WEIGHTED_HPP_
#include <string>
@@ -24,10 +24,12 @@
namespace jubatus {
namespace classifier {
-class CW : public classifier_base {
+class confidence_weighted : public classifier_base {
public:
- explicit CW(storage::storage_base* storage);
- CW(const classifier_config& config, storage::storage_base* storage);
+ explicit confidence_weighted(storage::storage_base* storage);
+ confidence_weighted(
+ const classifier_config& config,
+ storage::storage_base* storage);
void train(const sfv_t& fv, const std::string& label);
std::string name() const;
private:
@@ -36,10 +38,10 @@ class CW : public classifier_base {
float step_weigth,
const std::string& pos_label,
const std::string& neg_label);
- classifier_config config;
+ classifier_config config_;
};
} // namespace classifier
} // namespace jubatus
-#endif // JUBATUS_CLASSIFIER_CW_HPP_
+#endif // JUBATUS_CLASSIFIER_CONFIDENCE_WEIGHTED_HPP_
View
22 src/classifier/nherd.cpp → src/classifier/normal_herd.cpp
@@ -14,7 +14,7 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include "nherd.hpp"
+#include "normal_herd.hpp"
#include <algorithm>
#include <cmath>
@@ -27,19 +27,21 @@ using std::string;
namespace jubatus {
namespace classifier {
-NHERD::NHERD(storage::storage_base* storage)
+normal_herd::normal_herd(storage::storage_base* storage)
: classifier_base(storage) {
classifier_base::use_covars_ = true;
- config.C = 0.1f;
+ config_.C = 0.1f;
}
-NHERD::NHERD(const classifier_config& config, storage::storage_base* storage)
+normal_herd::normal_herd(
+ const classifier_config& config,
+ storage::storage_base* storage)
: classifier_base(storage),
- config(config) {
+ config_(config) {
classifier_base::use_covars_ = true;
}
-void NHERD::train(const sfv_t& sfv, const string& label) {
+void normal_herd::train(const sfv_t& sfv, const string& label) {
string incorrect_label;
float variance = 0.f;
float margin = -calc_margin_and_variance(sfv, label, incorrect_label,
@@ -50,7 +52,7 @@ void NHERD::train(const sfv_t& sfv, const string& label) {
update(sfv, margin, variance, label, incorrect_label);
}
-void NHERD::update(
+void normal_herd::update(
const sfv_t& sfv,
float margin,
float variance,
@@ -69,7 +71,7 @@ void NHERD::update(
float val_covariance_pos = val * pos_val.v2;
float val_covariance_neg = val * neg_val.v2;
- const float C = config.C;
+ const float C = config_.C;
storage_->set2(
feature,
pos_label,
@@ -95,8 +97,8 @@ void NHERD::update(
}
}
-std::string NHERD::name() const {
- return string("NHERD");
+std::string normal_herd::name() const {
+ return string("normal_herd");
}
} // namespace classifier
View
14 src/classifier/nherd.hpp → src/classifier/normal_herd.hpp
@@ -14,8 +14,8 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#ifndef JUBATUS_CLASSIFIER_NHERD_HPP_
-#define JUBATUS_CLASSIFIER_NHERD_HPP_
+#ifndef JUBATUS_CLASSIFIER_NORMAL_HERD_HPP_
+#define JUBATUS_CLASSIFIER_NORMAL_HERD_HPP_
#include <string>
@@ -24,10 +24,10 @@
namespace jubatus {
namespace classifier {
-class NHERD : public classifier_base {
+class normal_herd : public classifier_base {
public:
- explicit NHERD(storage::storage_base* storage);
- NHERD(const classifier_config& config, storage::storage_base* storage);
+ explicit normal_herd(storage::storage_base* storage);
+ normal_herd(const classifier_config& config, storage::storage_base* storage);
void train(const sfv_t& fv, const std::string& label);
std::string name() const;
private:
@@ -37,10 +37,10 @@ class NHERD : public classifier_base {
float variance,
const std::string& pos_label,
const std::string& neg_label);
- classifier_config config;
+ classifier_config config_;
};
} // namespace classifier
} // namespace jubatus
-#endif // JUBATUS_CLASSIFIER_NHERD_HPP_
+#endif // JUBATUS_CLASSIFIER_NORMAL_HERD_HPP_
View
10 src/classifier/pa.cpp → src/classifier/passive_aggressive.cpp
@@ -14,7 +14,7 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include "pa.hpp"
+#include "passive_aggressive.hpp"
#include <string>
@@ -23,11 +23,11 @@ using std::string;
namespace jubatus {
namespace classifier {
-PA::PA(storage::storage_base* storage)
+passive_aggressive::passive_aggressive(storage::storage_base* storage)
: classifier_base(storage) {
}
-void PA::train(const sfv_t& sfv, const string& label) {
+void passive_aggressive::train(const sfv_t& sfv, const string& label) {
string incorrect_label;
float margin = calc_margin(sfv, label, incorrect_label);
float loss = 1.f + margin;
@@ -41,8 +41,8 @@ void PA::train(const sfv_t& sfv, const string& label) {
update_weight(sfv, loss / (2 * sfv_norm), label, incorrect_label);
}
-string PA::name() const {
- return string("PA");
+string passive_aggressive::name() const {
+ return string("passive_aggressive");
}
} // namespace classifier
View
10 src/classifier/pa.hpp → src/classifier/passive_aggressive.hpp
@@ -14,8 +14,8 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#ifndef JUBATUS_CLASSIFIER_PA_HPP_
-#define JUBATUS_CLASSIFIER_PA_HPP_
+#ifndef JUBATUS_CLASSIFIER_PASSIVE_AGGRESSIVE_HPP_
+#define JUBATUS_CLASSIFIER_PASSIVE_AGGRESSIVE_HPP_
#include <string>
@@ -24,9 +24,9 @@
namespace jubatus {
namespace classifier {
-class PA : public classifier_base {
+class passive_aggressive : public classifier_base {
public:
- explicit PA(storage::storage_base* storage);
+ explicit passive_aggressive(storage::storage_base* storage);
void train(const sfv_t& fv, const std::string& label);
std::string name() const;
};
@@ -34,4 +34,4 @@ class PA : public classifier_base {
} // namespace classifier
} // namespace jubatus
-#endif // JUBATUS_CLASSIFIER_PA_HPP_
+#endif // JUBATUS_CLASSIFIER_PASSIVE_AGGRESSIVE_HPP_
View
18 src/classifier/pa1.cpp → src/classifier/passive_aggressive_1.cpp
@@ -14,7 +14,7 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include "pa1.hpp"
+#include "passive_aggressive_1.hpp"
#include <algorithm>
#include <string>
@@ -25,16 +25,18 @@ using std::min;
namespace jubatus {
namespace classifier {
-PA1::PA1(storage::storage_base* storage)
+passive_aggressive_1::passive_aggressive_1(storage::storage_base* storage)
: classifier_base(storage) {
}
-PA1::PA1(const classifier_config& config, storage::storage_base* storage)
+passive_aggressive_1::passive_aggressive_1(
+ const classifier_config& config,
+ storage::storage_base* storage)
: classifier_base(storage),
- config(config) {
+ config_(config) {
}
-void PA1::train(const sfv_t& sfv, const string& label) {
+void passive_aggressive_1::train(const sfv_t& sfv, const string& label) {
string incorrect_label;
float margin = calc_margin(sfv, label, incorrect_label);
float loss = 1.f + margin;
@@ -47,11 +49,11 @@ void PA1::train(const sfv_t& sfv, const string& label) {
}
update_weight(
- sfv, min(config.C, loss / (2 * sfv_norm)), label, incorrect_label);
+ sfv, min(config_.C, loss / (2 * sfv_norm)), label, incorrect_label);
}
-string PA1::name() const {
- return string("PA1");
+string passive_aggressive_1::name() const {
+ return string("passive_aggressive_1");
}
} // namespace classifier