Options
All
  • Public
  • Public/Protected
  • All
Menu

A slot that stores a categorical value extracted using fuzzy string matching.

Hierarchy

Index

Constructors

constructor

  • new CategoricalSlot(__namedParameters: { categories: {}; dependantActions: string[]; invDependantActions: string[]; name: string; threshold: number }): CategoricalSlot
  • Parameters

    • __namedParameters: { categories: {}; dependantActions: string[]; invDependantActions: string[]; name: string; threshold: number }
      • categories: {}
        • [category: string]: string[]
      • dependantActions: string[]
      • invDependantActions: string[]
      • name: string
      • threshold: number

    Returns CategoricalSlot

Properties

Protected actions

actions: any[]

The list of every action the model can take.

Private categories

categories: Categories

Private categoryNames

categoryNames: string[]

Readonly id

id: string

Readonly size

size: number

Private threshold

threshold: number

Methods

export

getActionMask

  • getActionMask(): boolean[]

getOptimizableFeatures

  • getOptimizableFeatures(data: any): tf.Tensor1D
  • Turn the data returned by handleQuery into an embedding vector. This function is used to expose featurizer variables to the model optimizer for training.

    Reimplementing this method is not necessary if your featurizer is not meant to be optimizable through gradient descent. In this case, just return the feature vector directly using the handleQuery method.

    remarks

    It's important to keep this function stateless, it should only depend of its tensor argument and of featurizer's variables.

    Parameters

    • data: any

    Returns tf.Tensor1D

getValue

handleAction

  • handleAction(action: any): void

handleQuery

  • handleQuery(query: string): Promise<tf.Tensor1D>

init

  • init(actions: any[]): Promise<void>

load

Private oneHotValue

resetDialog

  • resetDialog(): void

setValue

Legend

  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Function
  • Type alias
  • Private property
  • Private method
  • Enumeration
  • Interface
  • Inherited method

Generated using TypeDoc