/
classifier.idl
81 lines (72 loc) · 2.43 KB
/
classifier.idl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Jubatus: Online machine learning framework for distributed environment
# Copyright (C) 2011,2012 Preferred Networks and Nippon Telegraph and Telephone Corporation.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1 as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
message estimate_result {
0: string label
1: double score
}
message labeled_datum {
0: string label
1: datum data
}
service classifier {
#- - Parameters:
#-
#- - ``name`` : a string value to uniquely identifies a task in zookeeper quorum
#- - ``data`` : list of tuple of label and datum
#-
#- - Returns:
#-
#- - Number of trained datum if this function updates models successfully.
#-
#- Training model at a server chosen randomly. ``tuple<string, datum>`` is a tuple of datum and it's label.
#- This function is designed to allow bulk update with list of tuple of label and datum.
#@random #@update #@pass
int train(0: list<labeled_datum> data)
#- - Parameters:
#-
#- - ``name`` : a string value to uniquely identifies a task in zookeeper quorum
#- - ``data`` : list of datum for classify
#-
#- - Returns:
#-
#- - List of estimate_results
#-
#- Estimating a result at a server choosen randomly. ``estimate_results`` is a list of tuple of label and it's reliablity value.
#@random #@analysis #@pass
list<list<estimate_result> > classify(0: list<datum> data)
#- - Returns:
#-
#- - List of Label
#-
#- Get all labels in the model
#@random #@analysis #@pass
list<string> get_labels()
#- - Parameters:
#-
#- - ``new_label`` : name of the new label
#-
#- - Returns:
#-
#- - True if this function appends label successfully.
#-
#- Append new label with no datum
#@broadcast #@update #@pass
bool set_label(0: string new_label)
#@broadcast #@update #@all_and
bool clear()
#@broadcast #@update #@all_or
bool delete_label(0: string target_label)
}