CustomMappingCatalog.FilterByStatefulCustomPredicate<TSrc,TState> Methode

Definition

Legen Sie Zeilen ab, bei denen ein angegebenes Prädikat "true" zurückgibt. Mit diesem Filter kann ein Cursorstatus beibehalten werden.

public static Microsoft.ML.IDataView FilterByStatefulCustomPredicate<TSrc,TState>(this Microsoft.ML.DataOperationsCatalog catalog, Microsoft.ML.IDataView input, Func<TSrc,TState,bool> filterPredicate, Action<TState> stateInitAction) where TSrc : class, new() where TState : class, new();
static member FilterByStatefulCustomPredicate : Microsoft.ML.DataOperationsCatalog * Microsoft.ML.IDataView * Func<'Src, 'State, bool (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'State : null and 'State : (new : unit -> 'State))> * Action<'State (requires 'State : null and 'State : (new : unit -> 'State))> -> Microsoft.ML.IDataView (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'State : null and 'State : (new : unit -> 'State))
<Extension()>
Public Function FilterByStatefulCustomPredicate(Of TSrc As {Class, New}, TState As {Class, New}) (catalog As DataOperationsCatalog, input As IDataView, filterPredicate As Func(Of TSrc, TState, Boolean), stateInitAction As Action(Of TState)) As IDataView

Typparameter

TSrc

Die Klasse, die definiert, welche Spalten aus den eingehenden Daten entnommen werden sollen.

TState

Der Typ, der den Cursorstatus beschreibt.

Parameter

catalog
DataOperationsCatalog

Der Datenoperationskatalog.

input
IDataView

Die Eingabedaten.

filterPredicate
Func<TSrc,TState,Boolean>

Ein Prädikat, das eine Eingabe vom Typ TSrc und ein Zustandsobjekt vom Typ TStateakzeptiert, und gibt "true" zurück, wenn die Zeile gefiltert werden soll (verworfen) und andernfalls "false".

stateInitAction
Action<TState>

Die Aktion zum Initialisieren des Zustandsobjekts, das einmal aufgerufen wird, bevor der Cursor initialisiert wird.

Gibt zurück

Gilt für: