Liking cljdoc? Tell your friends :D

kigen.transducer.common

Lossless machine learning: constructing a single symbol output transducer from input word, output symbol pairs by logic programming. In other words, constructing a Moore-machine. https://en.wikipedia.org/wiki/Moore_machine There are several implementations for representing the transducer. These are the common functions. delta - the state transition table is a nested associative data structure (map or vector) (delta input) gives a transformation of the state set

Lossless machine learning: constructing a single symbol output transducer  from input word,
output symbol pairs by logic programming.
In other words, constructing a Moore-machine. https://en.wikipedia.org/wiki/Moore_machine
There are several implementations for representing the transducer. These are the common functions.
delta - the state transition table is a nested associative data structure (map or vector)
(delta input) gives a transformation of the state set
raw docstring

checkclj

(check io-pairs {delta :delta omega :omega})

Returns true if the given automaton (defined by solution, state transition function and output function) will indeed produce the output values given in the io-pairs. It uses format-flexible for processing the raw solution.

Returns true if the given automaton (defined by solution, state transition function
and output function) will indeed produce the output values given in the io-pairs.
It uses format-flexible for processing the raw solution.
sourceraw docstring

degrees-of-freedomclj

(degrees-of-freedom {delta :delta omega :omega})

Computes the total degrees of freedom for the transducer, and also how many is actually used of those. Returns a pair of used dofs, and the total number of them. Used as a measure how partial the transducer is.

Computes the total degrees of freedom for the transducer, and also how many is actually used of those. Returns a pair of used dofs, and the total number of them. Used as a measure how partial the transducer is.
sourceraw docstring

experimentclj

(experiment title io-pairs n transducer-function)

A script to run an experiment for constructing a transducer for the given input-output pairs. The construction method is given as a function. If the transducer-function is producing a lazy list (like core.logic output), then it should composed with first.

A script to run an experiment for constructing a transducer for the given
input-output pairs. The construction method is given as
a function.
If the transducer-function is producing a lazy list (like core.logic output),
then it should composed with first.
sourceraw docstring

extract-all-mapsclj

(extract-all-maps io-pairs {delta :delta})

Collects all the maps used by processing all input-output pairs.

Collects all the maps used by processing all input-output pairs.
sourceraw docstring

extract-mapsclj

(extract-maps delta initial-state input-word)

Collects all the maps from applying the transducer to an input word. It computes the trajectory, and labels the state transitions with input symbols.

Collects all the maps from applying the transducer to an input word. It computes the trajectory, and labels the state transitions with input symbols.
sourceraw docstring

input-symbols-fnclj

(input-symbols-fn io-pairs)

Returns all collected input symbols appearing in the input-output pairs without repetition. Returned as a vector, the indices can be used to refer to the symbols. The order of the symbols defined by the order of their first appeareances in the io-pairs.

Returns all collected input symbols appearing in the input-output
pairs without repetition. Returned as a vector, the indices can be used
to refer to the symbols. The order of the symbols defined by the order
of their first appeareances in the io-pairs.
sourceraw docstring

modded-io-pairsclj

(modded-io-pairs io-pairs)

Recodes the input symbols to natural numbers and adds an extra input at the end serving for the state readout.

Recodes the input symbols to natural numbers and adds an extra input at the end serving for the state readout.
sourceraw docstring

output-symbols-fnclj

(output-symbols-fn io-pairs)

Returns all collected output symbols appearing in the input-output pairs without repetition. Returned as a vector, the indices can be used to refer to the symbols. The order of the symbols defined by the order of their first appeareances in the io-pairs.

Returns all collected output symbols appearing in the input-output
pairs without repetition. Returned as a vector, the indices can be used
to refer to the symbols. The order of the symbols defined by the order
of their first appeareances in the io-pairs.
sourceraw docstring

partial-deltaclj

(partial-delta io-pairs {delta :delta n :n :as transducer})

Returns a new partial state transition table, nils when the particular map is not used when processing all input-output pairs.

Returns a new partial state transition table, nils when the particular map
is not used when processing all input-output pairs.
sourceraw docstring

partial-omegaclj

(partial-omega io-pairs {delta :delta omega :omega n :n})

It processes all input words and removes the states from omega that are never used.

It processes all input words and removes the states
from omega that are never used.
sourceraw docstring

partial-transducerclj

(partial-transducer io-pairs transducer)
source

result-stateclj

(result-state delta initial-state input-word)

Processes an input word (sequence of input symbols) by an automaton described by the delta state transition table (nested associative data structure, mapping inputs to transformations of the state set) starting from the given initial state. It returns the resulting state.

Processes an input word (sequence of input symbols) by an automaton described by the delta state transition table
(nested associative data structure, mapping inputs to transformations of the state set) starting from the given initial state.
It returns the resulting state.
sourceraw docstring

result-stateoclj

(result-stateo delta initial-state input-word output)

The relational version of result-state.

The relational version of result-state.
sourceraw docstring

trajectoriesclj

(trajectories io-pairs {delta :delta omega :omega})

Creates string representations of all trajectories by the io-pairs.

Creates string representations of all trajectories by the io-pairs.
sourceraw docstring

trajectoryclj

(trajectory delta initial-state input-word)

Processes an input word (sequence of input symbols) by an automaton described by the delta state transition table (nested associative data structure, mapping inputs to transformations of the state set). It returns the sequence of states visited starting from the given initial state. Same as result-state, but the whole trajectory (initital, all intermittent states and final state) is returned.

Processes an input word (sequence of input symbols) by an automaton described by the delta state transition table
 (nested associative data structure, mapping inputs to transformations of the state set).
It returns the sequence of states visited starting from the given initial state.
Same as result-state, but the whole trajectory (initital, all intermittent states and final state) is returned.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close