CustomMappingCatalog.FilterByCustomPredicate<TSrc> Method

Definition

Drop rows where a specified predicate returns true.

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

Type Parameters

TSrc

The class defining which columns to take from the incoming data.

Parameters

catalog
DataOperationsCatalog

The data operations catalog.

input
IDataView

The input data.

filterPredicate
Func<TSrc,Boolean>

A predicate, that takes an input of type TSrc and returns true if the row should be filtered (dropped) and false otherwise.

Returns

Applies to