Markov.ModelActions (markov v3.0.0)

Performs training, generation and probability shifting. Supposed to only ever be used by Markov.ModelServers.

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 nuke(name :: term()) :: :ok
Link to this function

process_scores(mf, rows, arg3)

processes {, :score, } tag queries

Link to this function

tq2ms(mf, query)

@spec tq2ms(
  {term(), [term()]},
  Markov.tag_query()
) :: :ets.match_spec()

tag query to match specification

@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()]
) :: :ok
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()}