Markov.ModelActions (markov v2.2.0)
Performs training, generation and probability shifting. Supposed to only ever
be used by Markov.ModelServer
s.
Link to this section Summary
Functions
Adjust the probabilities of a batch of connections
Adjusts the probability of one connection
processes {, :score, } tag queries
tag query to match specification
tag query to match spec condition
Link to this section Functions
Link to this function
adjust_batch_probs(params)
Adjust the probabilities of a batch of connections
Link to this function
adjust_one_prob(param_tensor)
Adjusts the probability of one connection
Link to this function
generate(state, tag_query)
@spec generate(Markov.ModelServer.State.t(), Markov.tag_query()) :: {{:ok, [term()]} | {:error, term()}, Markov.ModelServer.State.t()}
Link to this function
next_state(state, current, tag_query)
@spec next_state(Markov.ModelServer.State.t(), [term()], Markov.tag_query()) :: {:ok, term(), Markov.ModelServer.State.t()} | {:error, term(), Markov.ModelServer.State.t()}
Link to this function
process_scores(from, rows, arg3, table)
processes {, :score, } tag queries
Link to this function
tq2ms(from, query)
@spec tq2ms([term()], Markov.tag_query()) :: :ets.match_spec()
tag query to match specification
Link to this function
tq2msc(tag)
@spec tq2msc(Markov.tag_query()) :: term()
tag query to match spec condition
Link to this function
train(state, tokens, tags)
@spec train( state :: Markov.ModelServer.State.t(), tokens :: [term()], tags :: [term()] ) :: Markov.ModelServer.State.t()
Link to this function
walk_chain(state, acc, queue, limit, tag_query)
@spec walk_chain( Markov.ModelServer.State.t(), [term()], [term()], non_neg_integer(), Markov.tag_query() ) :: {{:ok, [term()]} | {:error, term()}, Markov.ModelServer.State.t()}