The trainable-object Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The trainable-object Reference Manual

This is the trainable-object Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 06:01:58 2022 GMT+0.

Table of Contents


1 Introduction


* Trainable-Object

This library provides an abstract class and CLOS APIs for the trainable funcallable instances.

The library is almost blank; It has no actual implementations in it.
Its sole purpose is to provide the interface for a machine learning model.

** API

: Class TRAINABLE-OBJECT (SERIALIZABLE-OBJECT)
: Generic Function (train    model input output &key verbose val-input val-output test-input test-output &allow-other-keys)
: Generic Function (evaluate model input output &key verbose &allow-other-keys)
: Generic Function (predict  model input        &key verbose &allow-other-keys)

** Dependencies
This library is at least tested on implementation listed below:

+ SBCL 1.4.12 on X86-64 Linux 4.4.0-142-generic (author's environment)

Also, it depends on the following libraries:

+ trivia by *Masataro Asai* :
    NON-optimized pattern matcher compatible with OPTIMA, with extensible optimizer interface and clean codebase
+ alexandria by *Nikodemus Siivola , and others.* :
    Alexandria is a collection of portable public domain utilities.
+ iterate by ** :
    Jonathan Amsterdam's iterator/gatherer/accumulator facility
+ closer-mop by *Pascal Costanza* :
    Closer to MOP is a compatibility layer that rectifies many of the absent or incorrect CLOS MOP features across a broad range of Common Lisp implementations.

** Installation

** Author, License, Copyright

Licensed under LGPL v3.

Copyright (c) 2019 Masataro Asai (guicho2.71828@gmail.com)
Copyright (c) 2019 IBM Corporation


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 trainable-object

Provides a metaclass and APIs for the trainable funcallable instances.

Author

Masataro Asai

Contact

guicho2.71828@gmail.com

License

LGPL

Version

0.1

Dependencies
  • closer-mop (system).
  • serializable-object (system).
Source

trainable-object.asd.

Child Component

package.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

3.1.1 trainable-object/trainable-object.asd

Source

trainable-object.asd.

Parent Component

trainable-object (system).

ASDF Systems

trainable-object.


3.1.2 trainable-object/package.lisp

Source

trainable-object.asd.

Parent Component

trainable-object (system).

Packages

trainable-object.

Public Interface

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 trainable-object

Source

package.lisp.

Use List
  • closer-mop.
  • common-lisp.
  • serializable-object.
Public Interface

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Generic functions

Generic Function: evaluate (model input output &key verbose &allow-other-keys)

Evaluate a model, i.e., compute the loss/score function for the ground truth output and the predicted output.

Package

trainable-object.

Source

package.lisp.

Methods
Method: evaluate :around ((m trainable-object) input output &key verbose &allow-other-keys)
Generic Function: logical-form (model &key &allow-other-keys)

A generic function that returns a symbolic logical form that corresponds to the machine learning model. Not all ML model has a method for this function.

Package

trainable-object.

Source

package.lisp.

Generic Function: predict (model input &key verbose &allow-other-keys)

Predict the output using a model.

Package

trainable-object.

Source

package.lisp.

Generic Function: train (model input output &key verbose val-input val-output test-input test-output &allow-other-keys)

Train a model using the input / output.
INPUT / OUTPUT could be a list, if the model has multiple inputs / outputs.

When BATCH is non-nil, it assumes a batch (multiple data points) input.
The responsibility for handling this parameter properly belongs to each method.
In general, when BATCH is an INTEGER value, it is assumed to be the batch processing size.

Package

trainable-object.

Source

package.lisp.


5.1.2 Standalone methods

Method: initialize-instance :after ((m binary-classifier) &rest args &key &allow-other-keys)
Source

package.lisp.


5.1.3 Classes

Class: binary-classifier
Package

trainable-object.

Source

package.lisp.

Direct superclasses

classifier.

Direct methods

initialize-instance.

Direct slots
Slot: classes
Type

fixnum

Initform

2

Class: classifier
Package

trainable-object.

Source

package.lisp.

Direct superclasses

trainable-object.

Direct subclasses

binary-classifier.

Direct slots
Slot: classes
Type

fixnum

Initargs

:classes

Class: trainable-object

It represents a function-like object that is trainable from data, and is serializable so that it can save its learned parameters.

Package

trainable-object.

Source

package.lisp.

Direct superclasses

serializable-object.

Direct subclasses

classifier.

Direct methods

evaluate.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   C   S  
Index Entry  Section

C
classes: Public classes
classes: Public classes

S
Slot, classes: Public classes
Slot, classes: Public classes

Jump to:   C   S