line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# This file is auto-generated from classifier.idl(0.4.5-347-g86989a6) with jenerator version 0.4.5-532-g61b108e/develop |
2
|
|
|
|
|
|
|
# *** DO NOT EDIT *** |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Jubatus::Classifier::Client; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
3407
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
41
|
|
7
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
8
|
1
|
|
|
1
|
|
5
|
use utf8; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
69
|
|
9
|
1
|
|
|
1
|
|
28
|
use autodie; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
10
|
1
|
|
|
1
|
|
5325
|
use AnyEvent::MPRPC; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
72
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
5
|
use parent 'Jubatus::Common::Client'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
13
|
|
|
|
|
|
|
require Jubatus::Classifier::Types; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub train { |
16
|
|
|
|
|
|
|
my ($self, $data) = @_; |
17
|
|
|
|
|
|
|
return $self->_call("train", Jubatus::Common::TInt->new(1, 4), [$data], |
18
|
|
|
|
|
|
|
[Jubatus::Common::TList->new(Jubatus::Common::TUserDef->new( |
19
|
|
|
|
|
|
|
Jubatus::Classifier::LabeledDatum->new()))]); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub classify { |
23
|
|
|
|
|
|
|
my ($self, $data) = @_; |
24
|
|
|
|
|
|
|
return $self->_call("classify", Jubatus::Common::TList->new( |
25
|
|
|
|
|
|
|
Jubatus::Common::TList->new(Jubatus::Common::TUserDef->new( |
26
|
|
|
|
|
|
|
Jubatus::Classifier::EstimateResult->new()))), [$data], |
27
|
|
|
|
|
|
|
[Jubatus::Common::TList->new(Jubatus::Common::TDatum->new())]); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub clear { |
31
|
|
|
|
|
|
|
my ($self) = @_; |
32
|
|
|
|
|
|
|
return $self->_call("clear", Jubatus::Common::TBool->new(), [], []); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |