Permalink
Browse files

Merge branch 'release/0.4.0'

  • Loading branch information...
2 parents aff6771 + af7ff6d commit 53edd53c5d28d4db745403b88a24e5ddba341a92 @rimms rimms committed Jan 11, 2013
Showing with 12,402 additions and 3,097 deletions.
  1. +15 −5 .travis.yml
  2. +53 −2 README.rst
  3. +78 −0 client/anomaly_client.hpp
  4. +37 −0 client/anomaly_types.hpp
  5. +62 −0 client/classifier_client.hpp
  6. +47 −0 client/classifier_types.hpp
  7. +130 −0 client/graph_client.hpp
  8. +71 −0 client/graph_types.hpp
  9. +98 −0 client/recommender_client.hpp
  10. +39 −0 client/recommender_types.hpp
  11. +62 −0 client/regression_client.hpp
  12. +37 −0 client/regression_types.hpp
  13. +82 −0 client/stat_client.hpp
  14. +5 −1 {src/stat → client}/stat_types.hpp
  15. +9 −0 client/wscript
  16. +30 −0 config/anomaly/lof.json
  17. +20 −0 config/classifier/arow.json
  18. +20 −0 config/classifier/cw.json
  19. +20 −0 config/classifier/nherd.json
  20. +17 −0 config/classifier/pa.json
  21. +20 −0 config/classifier/pa1.json
  22. +20 −0 config/classifier/pa2.json
  23. +17 −0 config/classifier/perceptron.json
  24. +7 −0 config/graph/graph_wo_index.json
  25. +25 −0 config/recommender/euclid_lsh.json
  26. +17 −0 config/recommender/inverted_index.json
  27. +20 −0 config/recommender/lsh.json
  28. +20 −0 config/recommender/minhash.json
  29. +21 −0 config/regression/pa.json
  30. +3 −0 config/stat/stat.json
  31. +10 −0 config/wscript
  32. +19 −0 src/anomaly/anomaly.hpp
  33. +49 −0 src/anomaly/anomaly_base.cpp
  34. +62 −0 src/anomaly/anomaly_base.hpp
  35. +59 −0 src/anomaly/anomaly_factory.cpp
  36. +34 −0 src/anomaly/anomaly_factory.hpp
  37. +33 −0 src/anomaly/anomaly_storage_base.hpp
  38. +29 −0 src/anomaly/anomaly_type.hpp
  39. +127 −0 src/anomaly/lof.cpp
  40. +58 −0 src/anomaly/lof.hpp
  41. +381 −0 src/anomaly/lof_storage.cpp
  42. +170 −0 src/anomaly/lof_storage.hpp
  43. +299 −0 src/anomaly/lof_storage_test.cpp
  44. +135 −0 src/anomaly/lof_test.cpp
  45. +31 −0 src/anomaly/wscript
  46. +9 −2 src/classifier/arow.cpp
  47. +4 −1 src/classifier/arow.hpp
  48. +4 −10 src/classifier/classifier_base.cpp
  49. +4 −7 src/classifier/classifier_base.hpp
  50. +38 −0 src/classifier/classifier_config.hpp
  51. +25 −15 src/classifier/classifier_factory.cpp
  52. +12 −3 src/classifier/classifier_factory.hpp
  53. +16 −15 src/classifier/classifier_test.cpp
  54. +1 −0 src/classifier/classifier_type.hpp
  55. +16 −7 src/classifier/cw.cpp
  56. +4 −1 src/classifier/cw.hpp
  57. +14 −6 src/classifier/nherd.cpp
  58. +6 −3 src/classifier/nherd.hpp
  59. +2 −0 src/classifier/pa.cpp
  60. +2 −1 src/classifier/pa.hpp
  61. +8 −1 src/classifier/pa1.cpp
  62. +4 −1 src/classifier/pa1.hpp
  63. +7 −2 src/classifier/pa2.cpp
  64. +4 −1 src/classifier/pa2.hpp
  65. +3 −2 src/classifier/perceptron.cpp
  66. +2 −0 src/classifier/perceptron.hpp
  67. +3 −2 src/classifier/wscript
  68. +6 −5 src/{jubatus.hpp → client.hpp}
  69. +183 −0 src/cmd/jubaconfig.cpp
  70. +13 −6 src/cmd/jubactl.cpp
  71. +9 −1 src/cmd/wscript
  72. +1 −1 src/common/cached_zk.cpp
  73. +147 −0 src/common/config.cpp
  74. +39 −0 src/common/config.hpp
  75. +99 −0 src/common/config_test.cpp
  76. +33 −0 src/common/config_util.cpp
  77. +39 −0 src/common/config_util.hpp
  78. +62 −0 src/common/config_util_test.cpp
  79. +2 −1 src/common/exception.cpp
  80. +6 −26 src/common/exception.hpp
  81. +3 −6 src/common/exception_info.hpp
  82. +3 −2 src/common/exception_test.cpp
  83. +21 −0 src/common/jsonconfig.hpp
  84. +250 −0 src/common/jsonconfig/cast.hpp
  85. +93 −0 src/common/jsonconfig/config.cpp
  86. +127 −0 src/common/jsonconfig/config.hpp
  87. +101 −0 src/common/jsonconfig/exception.cpp
  88. +130 −0 src/common/jsonconfig/exception.hpp
  89. +7 −0 src/common/jsonconfig/wscript
  90. +467 −0 src/common/jsonconfig_test.cpp
  91. +15 −0 src/common/lock_service.cpp
  92. +7 −0 src/common/lock_service.hpp
  93. +18 −0 src/common/membership.cpp
  94. +5 −0 src/common/membership.hpp
  95. +12 −0 src/common/membership_test.cpp
  96. +0 −323 src/common/mprpc/async_client.cpp
  97. +0 −178 src/common/mprpc/async_client.hpp
  98. +123 −0 src/common/mprpc/byte_buffer.hpp
  99. +0 −199 src/common/mprpc/rpc_client.cpp
  100. +0 −314 src/common/mprpc/rpc_client.hpp
  101. +1 −1 src/common/mprpc/rpc_client_test.cpp
  102. +100 −0 src/common/mprpc/rpc_error.hpp
  103. +59 −0 src/common/mprpc/rpc_mclient.cpp
  104. +246 −0 src/common/mprpc/rpc_mclient.hpp
  105. +46 −0 src/common/mprpc/rpc_response.hpp
  106. +46 −0 src/common/mprpc/rpc_result.hpp
  107. +88 −0 src/common/mprpc/rpc_server.cpp
  108. +234 −0 src/common/mprpc/rpc_server.hpp
  109. +3 −3 src/common/mprpc/wscript
  110. +77 −0 src/common/portable_mixer.hpp
  111. +40 −0 src/common/util.cpp
  112. +2 −0 src/common/util.hpp
  113. +15 −0 src/common/util_test.cpp
  114. +6 −3 src/common/wscript
  115. +99 −17 src/common/zk.cpp
  116. +10 −2 src/common/zk.hpp
  117. +6 −1 src/common/zk_test.cpp
  118. +26 −67 src/framework/keeper.cpp
  119. +465 −58 src/framework/keeper.hpp
  120. +96 −0 src/framework/keeper_common.cpp
  121. +63 −0 src/framework/keeper_common.hpp
  122. +15 −13 src/framework/mixable.hpp
  123. +5 −4 src/framework/mixable_test.cpp
  124. +1 −1 src/framework/mixer/dummy_mixer.hpp
  125. +15 −14 src/framework/mixer/linear_mixer.cpp
  126. +6 −5 src/framework/mixer/linear_mixer.hpp
  127. +26 −13 src/framework/mixer/linear_mixer_test.cpp
  128. +5 −2 src/framework/mixer/mixer.hpp
  129. +10 −4 src/framework/server_base.cpp
  130. +27 −2 src/framework/server_helper.cpp
  131. +41 −9 src/framework/server_helper.hpp
  132. +260 −175 src/framework/server_util.cpp
  133. +27 −7 src/framework/server_util.hpp
  134. +3 −2 src/framework/wscript
  135. +15 −0 src/fv_converter/converter_config.cpp
  136. +4 −1 src/fv_converter/converter_config.hpp
  137. +1 −1 src/fv_converter/datum_to_fv_converter.cpp
  138. +5 −5 src/fv_converter/datum_to_fv_converter_test.cpp
  139. +6 −2 src/fv_converter/json_converter_test.cpp
  140. +4 −2 src/graph/graph_factory.cpp
  141. +4 −1 src/graph/graph_factory.hpp
  142. +0 −2 src/graph/graph_type.hpp
  143. +15 −8 src/graph/graph_wo_index.cpp
  144. +20 −3 src/graph/graph_wo_index.hpp
  145. +2 −2 src/graph/wscript
  146. +3 −1 src/jubavisor/process.cpp
  147. +1 −1 src/jubavisor/wscript
  148. +217 −0 src/recommender/euclid_lsh.cpp
  149. +99 −0 src/recommender/euclid_lsh.hpp
  150. +160 −0 src/recommender/euclid_lsh_test.cpp
  151. +7 −0 src/recommender/inverted_index.cpp
  152. +1 −0 src/recommender/inverted_index.hpp
  153. +15 −0 src/recommender/lsh.cpp
  154. +15 −0 src/recommender/lsh.hpp
  155. +11 −0 src/recommender/minhash.cpp
  156. +17 −0 src/recommender/minhash.hpp
  157. +2 −0 src/recommender/recommender.hpp
  158. +8 −0 src/recommender/recommender_base.cpp
  159. +4 −3 src/recommender/recommender_base.hpp
  160. +6 −0 src/recommender/recommender_base_test.cpp
  161. +15 −6 src/recommender/recommender_factory.cpp
  162. +8 −4 src/recommender/recommender_factory.hpp
  163. +121 −0 src/recommender/recommender_mock.cpp
  164. +66 −0 src/recommender/recommender_mock.hpp
  165. +141 −0 src/recommender/recommender_mock_storage.cpp
  166. +79 −0 src/recommender/recommender_mock_storage.hpp
  167. +124 −0 src/recommender/recommender_mock_storage_test.cpp
  168. +87 −0 src/recommender/recommender_mock_test.cpp
  169. +42 −0 src/recommender/recommender_mock_util.cpp
  170. +31 −0 src/recommender/recommender_mock_util.hpp
  171. +1 −1 src/recommender/recommender_random_test.cpp
  172. +0 −113 src/recommender/recommender_test.cpp
  173. +7 −1 src/recommender/wscript
  174. +7 −5 src/regression/pa.cpp
  175. +17 −2 src/regression/pa.hpp
  176. +2 −1 src/regression/regression_base.cpp
  177. +3 −0 src/regression/regression_base.hpp
  178. +8 −3 src/regression/regression_factory.cpp
  179. +12 −5 src/regression/regression_factory.hpp
  180. +10 −4 src/regression/regression_factory_test.cpp
  181. +1 −1 src/regression/regression_test.cpp
  182. +79 −0 src/server/anomaly.idl
  183. +74 −0 src/server/anomaly_client.hpp
  184. +55 −0 src/server/anomaly_impl.cpp
  185. +27 −0 src/server/anomaly_keeper.cpp
  186. +226 −0 src/server/anomaly_serv.cpp
  187. +110 −0 src/server/anomaly_serv.hpp
  188. +42 −0 src/server/anomaly_server.hpp
  189. +119 −0 src/server/anomaly_test.cpp
  190. +33 −0 src/server/anomaly_types.hpp
  191. +3 −14 src/server/classifier.idl
  192. +24 −25 src/server/classifier_client.hpp
  193. +8 −21 src/server/classifier_impl.cpp
  194. +6 −7 src/server/classifier_keeper.cpp
  195. +38 −10 src/server/classifier_serv.cpp
  196. +4 −4 src/server/classifier_serv.hpp
  197. +3 −4 src/server/classifier_server.hpp
  198. +87 −93 src/server/classifier_test.cpp
  199. +0 −10 src/server/classifier_types.hpp
  200. +34 −33 src/server/graph.idl
  201. +76 −69 src/server/graph_client.hpp
  202. +37 −44 src/server/graph_impl.cpp
  203. +20 −19 src/server/graph_keeper.cpp
  204. +115 −39 src/server/graph_serv.cpp
  205. +23 −15 src/server/graph_serv.hpp
  206. +14 −12 src/server/graph_server.hpp
  207. +28 −19 src/server/graph_test.cpp
  208. +6 −14 src/server/recommender.idl
  209. +51 −52 src/server/recommender_client.hpp
  210. +21 −34 src/server/recommender_impl.cpp
  211. +15 −16 src/server/recommender_keeper.cpp
  212. +57 −22 src/server/recommender_serv.cpp
  213. +10 −12 src/server/recommender_serv.hpp
  214. +0 −50 src/server/recommender_serv_test.cpp
  215. +7 −7 src/server/recommender_server.hpp
  216. +25 −32 src/server/recommender_test.cpp
  217. +0 −10 src/server/recommender_types.hpp
  218. +3 −13 src/server/regression.idl
  219. +24 −26 src/server/regression_client.hpp
  220. +8 −21 src/server/regression_impl.cpp
  221. +6 −7 src/server/regression_keeper.cpp
  222. +31 −9 src/server/regression_serv.cpp
  223. +4 −4 src/server/regression_serv.hpp
  224. +3 −3 src/server/regression_server.hpp
  225. +23 −13 src/server/regression_test.cpp
  226. +0 −10 src/server/regression_types.hpp
  227. +3 −10 src/server/stat.idl
  228. +39 −40 src/server/stat_client.hpp
  229. +13 −26 src/server/stat_impl.cpp
  230. +11 −12 src/server/stat_keeper.cpp
  231. +27 −11 src/server/stat_serv.cpp
  232. +4 −4 src/server/stat_serv.hpp
  233. +3 −3 src/server/stat_server.hpp
  234. +2 −2 src/server/stat_test.cpp
  235. +0 −9 src/server/stat_types.hpp
  236. +30 −0 src/server/test_input/config.anomaly.json
  237. +20 −0 src/server/test_input/config.classifier.AROW.json
  238. +20 −0 src/server/test_input/config.classifier.CW.json
  239. +20 −0 src/server/test_input/config.classifier.NHERD.json
  240. +17 −0 src/server/test_input/config.classifier.PA.json
  241. +20 −0 src/server/test_input/config.classifier.PA1.json
  242. +20 −0 src/server/test_input/config.classifier.PA2.json
  243. +17 −0 src/server/test_input/config.classifier.perceptron.json
  244. +17 −0 src/server/test_input/config.classifier.saitama.json
  245. +7 −0 src/server/test_input/config.graph.json
  246. +26 −10 src/server/test_input/config.json
  247. +17 −0 src/server/test_input/config.recommender.json
  248. +21 −0 src/server/test_input/config.regression.json
  249. +3 −0 src/server/test_input/config.stat.json
  250. +2 −2 src/server/test_util.hpp
  251. +9 −30 src/server/wscript
  252. +0 −41 src/stat/stat_server.hpp
  253. +0 −57 src/stat/stat_server_impl.cpp
  254. +0 −34 src/stat/stat_server_impl.hpp
  255. +2 −1 src/storage/bit_index_storage.cpp
  256. +21 −5 src/storage/bit_vector.cpp
  257. +17 −0 src/storage/bit_vector_test.cpp
  258. +2 −1 src/storage/inverted_index_storage.cpp
  259. +435 −0 src/storage/lsh_index_storage.cpp
  260. +121 −0 src/storage/lsh_index_storage.hpp
  261. +315 −0 src/storage/lsh_index_storage_test.cpp
  262. +151 −0 src/storage/lsh_util.cpp
  263. +54 −0 src/storage/lsh_util.hpp
  264. +102 −0 src/storage/lsh_util_test.cpp
  265. +108 −0 src/storage/lsh_vector.cpp
  266. +100 −0 src/storage/lsh_vector.hpp
  267. +92 −0 src/storage/lsh_vector_test.cpp
  268. +3 −2 src/storage/storage_type.hpp
  269. +7 −1 src/storage/wscript
  270. +2 −3 src/wscript
  271. +41 −33 tools/generate_clients.py
  272. +2 −13 tools/generator/impl_generator.ml
  273. +4 −5 tools/generator/keeper_generator.ml
  274. +97 −0 tools/mpidlconv
  275. +25 −0 tools/packaging/allinone/README.md
  276. +78 −47 tools/packaging/allinone/jubapkg
  277. +9 −11 tools/packaging/allinone/jubapkg_version
  278. +15 −0 tools/packaging/allinone/metadata/jubatus-allinone.spec
  279. +0 −1 tools/packaging/homebrew/jubatus.rb
  280. +4 −9 tools/packaging/rpm/README.rst
  281. +31 −31 tools/packaging/rpm/package-config
  282. +40 −16 tools/packaging/rpm/package-prebuild
  283. +2 −2 tools/packaging/rpm/package.sh
  284. +1 −0 tools/packaging/rpm/rpmbuild/.gitignore
  285. +0 −4 tools/packaging/rpm/rpmbuild/glog/SPECS/glog.spec.in
  286. +0 −47 tools/packaging/rpm/rpmbuild/jubatus-client/SPECS/jubatus-client.spec.in
  287. +58 −0 tools/packaging/rpm/rpmbuild/jubatus-mpio/SPECS/jubatus-mpio.spec.in
  288. +64 −0 tools/packaging/rpm/rpmbuild/jubatus-msgpack-rpc/SPECS/jubatus-msgpack-rpc.spec.in
  289. +0 −4 tools/packaging/rpm/rpmbuild/jubatus-release/SPECS/jubatus-release.spec.in
  290. +19 −10 tools/packaging/rpm/rpmbuild/jubatus/SPECS/jubatus.spec.in
  291. +0 −4 tools/packaging/rpm/rpmbuild/mecab-ipadic/SPECS/mecab-ipadic.spec.in
  292. +0 −4 tools/packaging/rpm/rpmbuild/mecab/SPECS/mecab.spec.in
  293. +0 −4 tools/packaging/rpm/rpmbuild/msgpack/SPECS/msgpack.spec.in
  294. +2 −5 tools/packaging/rpm/rpmbuild/pficommon/SPECS/pficommon.spec.in
  295. +1 −5 tools/packaging/rpm/rpmbuild/re2/SPECS/re2.spec.in
  296. +0 −4 tools/packaging/rpm/rpmbuild/ux/SPECS/ux.spec.in
  297. +1 −5 tools/packaging/rpm/rpmbuild/zookeeper-client/SPECS/zookeeper-client.spec.in
  298. +29 −5 wscript
View
@@ -11,8 +11,16 @@ before_install:
- sudo apt-get -qq update
install:
- # msgpack, libevent
- - sudo apt-get -qq install libmsgpack-dev libevent-dev
+ # msgpack
+ - sudo apt-get -qq install libmsgpack-dev
+ # jubatus-mpio
+ - git clone https://github.com/jubatus/jubatus-mpio.git
+ - pushd jubatus-mpio && git checkout develop && ./bootstrap && ./configure && make && sudo make install && popd
+ - sudo ldconfig
+ # jubatus-msgpack-rpc
+ - git clone https://github.com/jubatus/jubatus-msgpack-rpc.git
+ - pushd jubatus-msgpack-rpc && git checkout develop && ./bootstrap && ./configure && make && sudo make install && popd
+ - sudo ldconfig
# glog
- wget http://google-glog.googlecode.com/files/glog-0.3.2.tar.gz && tar xf glog-0.3.2.tar.gz
- pushd glog-0.3.2 && ./configure && make && sudo make install && popd
@@ -22,8 +30,8 @@ install:
- pushd pficommon && ./waf configure --disable-database --disable-fcgi --disable-magickpp && ./waf build && sudo ./waf install && popd
- sudo ldconfig
# zookeeper
- - wget http://apache.openmirror.de/zookeeper/zookeeper-3.4.4/zookeeper-3.4.4.tar.gz && tar xf zookeeper-3.4.4.tar.gz
- - pushd zookeeper-3.4.4/src/c && ./configure && make && sudo make install && popd
+ - wget http://apache.openmirror.de/zookeeper/zookeeper-3.4.4/zookeeper-3.4.4.tar.gz && tar xf zookeeper-3.4.5.tar.gz
+ - pushd zookeeper-3.4.5/src/c && ./configure && make && sudo make install && popd
- sudo ldconfig
# re2
- hg clone https://re2.googlecode.com/hg re2
@@ -44,7 +52,9 @@ install:
script:
- ./waf configure --enable-zookeeper --enable-mecab --enable-ux
- - ./waf build --checkall
+ - ./waf build
+ - ./waf install
+ - ./waf --checkall
branches:
only:
View
@@ -10,7 +10,7 @@ QuickStart
Jubatus officially supports Ubuntu >= 12.04 , Red Hat Enterprise Linux >= 6.2 . On other platforms, some may work if they have gcc >= 4.4 .
-For minimal standalone mode, Jubatus requires libevent >= 1.4 , pficommon >= 1.3.1 (commit 8fde51454af897cc971bab9033e217ff83b12f78 or later), google-glog , libmsgpack, python >= 2.6 . Please install these software with headers before installation.
+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.
::
@@ -19,7 +19,7 @@ For minimal standalone mode, Jubatus requires libevent >= 1.4 , pficommon >= 1.3
$ ./waf configure --disable-re2
$ ./waf build
$ sudo ./waf install
- $ jubaclassifier
+ $ jubaclassifier -f /usr/local/share/jubatus/example/config/classifier/pa.json
Here Jubatus classifier server has started. Enjoy!
@@ -31,6 +31,57 @@ LGPL 2.1
Update history
--------------
+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
+
+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
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -0,0 +1,78 @@
+
+// This file is auto-generated from anomaly.idl
+// *** DO NOT EDIT ***
+
+#ifndef ANOMALY_CLIENT_HPP_
+#define ANOMALY_CLIENT_HPP_
+
+
+#include "anomaly_types.hpp"
+#include <jubatus/msgpack/rpc/client.h>
+
+
+namespace jubatus {
+
+namespace anomaly {
+
+namespace client {
+
+class anomaly {
+public:
+ anomaly(const std::string &host, uint64_t port, double timeout_sec)
+ : c_(host, port) {
+ c_.set_timeout( timeout_sec );
+ }
+
+ std::string get_config(std::string name) {
+ return c_.call("get_config", name).get<std::string >();
+ }
+
+ bool clear_row(std::string name, std::string id) {
+ return c_.call("clear_row", name, id).get<bool >();
+ }
+
+ std::pair<std::string, float > add(std::string name, datum row) {
+ return c_.call("add", name, row).get<std::pair<std::string, float > >();
+ }
+
+ float update(std::string name, std::string id, datum row) {
+ return c_.call("update", name, id, row).get<float >();
+ }
+
+ bool clear(std::string name) {
+ return c_.call("clear", name).get<bool >();
+ }
+
+ float calc_score(std::string name, datum row) {
+ return c_.call("calc_score", name, row).get<float >();
+ }
+
+ std::vector<std::string > get_all_rows(std::string name) {
+ return c_.call("get_all_rows", name).get<std::vector<std::string > >();
+ }
+
+ bool save(std::string name, std::string id) {
+ return c_.call("save", name, id).get<bool >();
+ }
+
+ bool load(std::string name, std::string id) {
+ return c_.call("load", name, id).get<bool >();
+ }
+
+ std::map<std::string, std::map<std::string, std::string > > get_status(std::string name) {
+ return c_.call("get_status", name).get<std::map<std::string, std::map<std::string, std::string > > >();
+ }
+
+private:
+ msgpack::rpc::client c_;
+};
+
+} // namespace client
+
+} // namespace anomaly
+
+} // namespace jubatus
+
+
+
+#endif // ANOMALY_CLIENT_HPP_
@@ -0,0 +1,37 @@
+
+// This file is auto-generated from anomaly.idl
+// *** DO NOT EDIT ***
+
+#ifndef ANOMALY_TYPES_HPP_
+#define ANOMALY_TYPES_HPP_
+
+
+#include <vector>
+#include <map>
+#include <string>
+#include <stdexcept>
+#include <stdint.h>
+#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;
+};
+
+} // namespace anomaly
+
+} // namespace jubatus
+
+
+
+#endif // ANOMALY_TYPES_HPP_
@@ -0,0 +1,62 @@
+
+// This file is auto-generated from classifier.idl
+// *** DO NOT EDIT ***
+
+#ifndef CLASSIFIER_CLIENT_HPP_
+#define CLASSIFIER_CLIENT_HPP_
+
+
+#include "classifier_types.hpp"
+#include <jubatus/msgpack/rpc/client.h>
+
+
+namespace jubatus {
+
+namespace classifier {
+
+namespace client {
+
+class classifier {
+public:
+ classifier(const std::string &host, uint64_t port, double timeout_sec)
+ : c_(host, port) {
+ c_.set_timeout( timeout_sec );
+ }
+
+ std::string get_config(std::string name) {
+ return c_.call("get_config", name).get<std::string >();
+ }
+
+ int32_t train(std::string name, std::vector<std::pair<std::string, datum > > data) {
+ return c_.call("train", name, data).get<int32_t >();
+ }
+
+ std::vector<std::vector<estimate_result > > classify(std::string name, std::vector<datum > data) {
+ return c_.call("classify", name, data).get<std::vector<std::vector<estimate_result > > >();
+ }
+
+ bool save(std::string name, std::string id) {
+ return c_.call("save", name, id).get<bool >();
+ }
+
+ bool load(std::string name, std::string id) {
+ return c_.call("load", name, id).get<bool >();
+ }
+
+ std::map<std::string, std::map<std::string, std::string > > get_status(std::string name) {
+ return c_.call("get_status", name).get<std::map<std::string, std::map<std::string, std::string > > >();
+ }
+
+private:
+ msgpack::rpc::client c_;
+};
+
+} // namespace client
+
+} // namespace classifier
+
+} // namespace jubatus
+
+
+
+#endif // CLASSIFIER_CLIENT_HPP_
@@ -0,0 +1,47 @@
+
+// This file is auto-generated from classifier.idl
+// *** DO NOT EDIT ***
+
+#ifndef CLASSIFIER_TYPES_HPP_
+#define CLASSIFIER_TYPES_HPP_
+
+
+#include <vector>
+#include <map>
+#include <string>
+#include <stdexcept>
+#include <stdint.h>
+#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;
+};
+
+struct estimate_result {
+public:
+
+
+ MSGPACK_DEFINE(label, score);
+
+ std::string label;
+ double score;
+};
+
+} // namespace classifier
+
+} // namespace jubatus
+
+
+
+#endif // CLASSIFIER_TYPES_HPP_
Oops, something went wrong.

0 comments on commit 53edd53

Please sign in to comment.