NAME

Jubatus::Classifier::Types - Perl extension for treating a data structure to use interface of classification server 'jubaclassifier'

SYNOPSIS

use Jubatus::Classifier::Types;

# If you want to any Jubatus::Classifier::* packages,
# all one need to do is write "use Jubatus::Classifier::Types;"

DESCRIPTION

This module provide the constructors and the methods to use interface of recommendation server 'jubaclassifier'.

METHODS

Jubatus::Classifier::Types will provide many packages and constructors, methods. These are used in Jubatus::Classifier::Clients.

See Jubatus::Classifier::Client for more detail.

Packages

Jubatus::Classifier::Datum

If you want to use this package, all one need to do is write "use Jubatus::Classifier::Types;"

Constructors

Jubatus::Classifier::Datum->new($string_values, $num_values);

Input:

- $string_values is a array reference which are allowed to locate many array
  references. Each of located arrry references should have two string
  value which are called "key" and "value".

- $num_values is a array reference which are allowed to locate many array
  references. Each of located arrry references should have two values.
  First string value which are called "key" and second float value which
  are called "value".

Output:

- Jubatus::Classifier::Datum object.

  This object have two fields.
  'string_values' field locate the array reference which was inputed as
  $string_values in constructor.
  'num_values' field locate the array reference which was inputed as
  $num_values in constructor.

Functions

to_msgpack->()

Input:

- None

Output:

- A array reference

  This array reference locate $string_values and $num_values which are given
  in constructor.

  This array reference certainly locate two array references. First
  reference are allowed to locate many array references. Each of located
  arrry references should have two string value which are called "key"
  and "value". Second reference are allowed to locate many array references.
  Each of located arrry references should have two values. First string
  value which are called "key" and second float value which are called
  "value".

from_msgpack->($return_value_from_msgpack)

Input:

- $return_value_from_msgpack is a array reference.

  This array reference certainly locate two array references. First
  reference are allowed to locate many array references. Each of located
  arrry references should have two string value which are called "key"
  and "value". Second reference are allowed to locate many array references.
  Each of located arrry references should have two values. First string
  value which are called "key" and second float value which are called
  "value".

Output:

- Jubatus::Classifier::Datum object.

Jubatus::Classifier::EstimateResult

If you want to use this package, all one need to do is write "use Jubatus::Classifier::Types;"

Constructors

Jubatus::Classifier::EstimateResult->new($property, $label, $score);

Input:

- $label is a string value of an estimated label.

- $score is a double value a probability value for the label.

Output:

- Jubatus::Classifier::EstimateResult object.

  This object have three fields.
  'label' field locate the string value which was inputed as $label in
  constructor.
  'score' field locate the double value which was inputed as $score in
  constructor.

Functions

from_msgpack->($return_value_from_msgpack)

Input:

- $return_value_from_msgpack is two reference.

  First reference is a string value of an estimated label.

  Second reference is a double value a probability value for the label.

Output:

- Jubatus::Classifier::EstimateResult object.

to_msgpack->()

Input:

- None

Output:

- A array reference

  This array reference locate $label and $score which are given in
  constructor.

SEE ALSO

Jubatus::Classifier::Client

http://jubat.us/ https://github.com/jubatus

AnyEvent::MPRPC AnyEvent::MPRPC::Client http://msgpack.org/ http://wiki.msgpack.org/display/MSGPACK/RPC+specification

https://github.com/overlast/p5-Jubatus

LICENSE

Copyright (C) 2013 by Toshinori Sato (@overlast).

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The licence of Jubatus is LGPL 2.1.

Jubatus: Online machine learning framework for distributed environment
Copyright (C) 2011,2012 Preferred Infrastructure 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.

However Jubatus.pm and Jubatus::*.pm is the pure Perl modules. Therefor the licence of Jubatus.pm and Jubatus::*.pm is the Perl's licence.

AUTHOR

Toshinori Sato (@overlast) <overlasting@gmail.com>