CustomMappingCatalog.FilterByStatefulCustomPredicate<TSrc,TState> 方法

定義

刪除指定謂詞回傳 true 的列。 此濾波器允許維持每游標狀態。

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

類型參數

TSrc

定義從輸入資料中取哪些欄位的類別。

TState

描述每光標狀態的類型。

參數

catalog
DataOperationsCatalog

資料操作目錄。

input
IDataView

輸入資料。

filterPredicate
Func<TSrc,TState,Boolean>

一個謂詞,該條件會接收一個型別 TSrc 為 的輸入和一個型別 TState為 的狀態物件,若該列需過濾(刪除)則回傳為真,否則回傳 false。

stateInitAction
Action<TState>

初始化狀態物件的動作,也就是游標初始化前呼叫一次的動作。

傳回

適用於