Compartir a través de


CustomMappingCatalog.StatefulCustomMapping<TSrc,TDst,TState> Método

Definición

Cree un StatefulCustomMappingEstimator<TSrc,TDst,TState>, que aplica una asignación personalizada de columnas de entrada a columnas de salida, al tiempo que permite un estado por cursor.

public static Microsoft.ML.Transforms.StatefulCustomMappingEstimator<TSrc,TDst,TState> StatefulCustomMapping<TSrc,TDst,TState> (this Microsoft.ML.TransformsCatalog catalog, Action<TSrc,TDst,TState> mapAction, Action<TState> stateInitAction, string contractName) where TSrc : class, new() where TDst : class, new() where TState : class, new();
static member StatefulCustomMapping : Microsoft.ML.TransformsCatalog * Action<'Src, 'Dst, 'State (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst) and 'State : null and 'State : (new : unit -> 'State))> * Action<'State (requires 'State : null and 'State : (new : unit -> 'State))> * string -> Microsoft.ML.Transforms.StatefulCustomMappingEstimator<'Src, 'Dst, 'State (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst) and 'State : null and 'State : (new : unit -> 'State))> (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst) and 'State : null and 'State : (new : unit -> 'State))
<Extension()>
Public Function StatefulCustomMapping(Of TSrc As {Class, New}, TDst As {Class, New}, TState As {Class, New}) (catalog As TransformsCatalog, mapAction As Action(Of TSrc, TDst, TState), stateInitAction As Action(Of TState), contractName As String) As StatefulCustomMappingEstimator(Of TSrc, TDst, TState)

Parámetros de tipo

TSrc

Clase que define qué columnas se van a tomar de los datos entrantes.

TDst

Clase que define qué columnas nuevas se agregan a los datos.

TState

Tipo que describe el estado por cursor.

Parámetros

catalog
TransformsCatalog

Catálogo de transformación.

mapAction
Action<TSrc,TDst,TState>

Acción de asignación. Además de los objetos de entrada y salida, la acción recibe un objeto de estado que puede examinar o modificar. Si el transformador resultante debe ser capaz de ahorrar, la clase que define mapAction debe implementarse StatefulCustomMappingFactory<TSrc,TDst,TState> y debe decorarse con CustomMappingFactoryAttributeAttribute con el proporcionado contractName. El ensamblado que contiene la clase debe registrarse en el entorno donde se carga mediante RegisterAssembly(Assembly, Boolean).

stateInitAction
Action<TState>

Acción para inicializar el objeto de estado, al que se llama una vez antes de inicializar el cursor.

contractName
String

Nombre del contrato, usado por ML.NET para cargar el modelo. Si null se especifica , el transformador resultante no sería capaz de guardar.

Devoluciones

Se aplica a