Options
All
  • Public
  • Public/Protected
  • All
Menu

Rule-based featurizer improving model robustness.

  • Featurize the previous action the model has taken.
  • Mask the LUS action when the user has just talked. (Force the model to reply at least once)
  • Mask the previous action. (Prevent looping : the model can't take two times in a row the same action)

Hierarchy

Index

Constructors

constructor

  • new ActionFeaturizer(__namedParameters?: { LUSAction: string; maskLUS: boolean; maskPreviousAction: boolean }): ActionFeaturizer
  • Parameters

    • Default value __namedParameters: { LUSAction: string; maskLUS: boolean; maskPreviousAction: boolean } = { maskLUS: true, maskPreviousAction: true, LUSAction: 'LUS' }
      • LUSAction: string
      • maskLUS: boolean
      • maskPreviousAction: boolean

    Returns ActionFeaturizer

Properties

Private LUSAction

LUSAction: any

Protected actions

actions: any[]

The list of every action the model can take.

Private embeddings

embeddings: Tensor

Readonly id

id: "Action Featurizer" = "Action Featurizer"

Private maskLUS

maskLUS: boolean

Private maskPreviousAction

maskPreviousAction: boolean

Private previousAction

previousAction: any

size

size: number

Private userTalked

userTalked: boolean

Methods

export

  • export(): Promise<{ embeddings: number[][] }>

getActionMask

  • getActionMask(): boolean[]

getOptimizableFeatures

  • getOptimizableFeatures(data: tf.Tensor2D): tf.Tensor1D

handleAction

  • handleAction(action: any): void

handleQuery

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

init

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

load

  • load(parameters: { embeddings: number[][] }): void

resetDialog

  • resetDialog(): void

Legend

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

Generated using TypeDoc