# This file is auto-generated from classifier.idl(0.5.2-72-g8fd4dbd) with jenerator version 0.5.2-45-gc4cfc98/master
# *** DO NOT EDIT ***


import msgpackrpc
import jubatus.common
from .types import *
from jubatus.common.types import *

class Classifier(jubatus.common.ClientBase):
  def __init__(self, host, port, name, timeout=10):
    super(Classifier, self).__init__(host, port, name, timeout)

  def train(self, data):
    return self.jubatus_client.call("train", [data], TInt(True, 4), [TList(
        TUserDef(LabeledDatum))])

  def classify(self, data):
    return self.jubatus_client.call("classify", [data], TList(TList(TUserDef(
        EstimateResult))), [TList(TDatum())])

  def get_labels(self):
    return self.jubatus_client.call("get_labels", [], TList(TString()), [])

  def set_label(self, new_label):
    return self.jubatus_client.call("set_label", [new_label], TBool(), [TString(
        )])

  def clear(self):
    return self.jubatus_client.call("clear", [], TBool(), [])
