RankingCatalog.CrossValidate 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
對 的摺data疊進行交叉驗證numberOfFolds,方法是擬estimator合 ,若提供 則尊重 rowGroupColumnName。
接著對每個子模型 labelColumnName 進行評估,並回傳指標。
public System.Collections.Generic.IReadOnlyList<Microsoft.ML.TrainCatalogBase.CrossValidationResult<Microsoft.ML.Data.RankingMetrics>> CrossValidate(Microsoft.ML.IDataView data, Microsoft.ML.IEstimator<Microsoft.ML.ITransformer> estimator, int numberOfFolds = 5, string labelColumnName = "Label", string rowGroupColumnName = "GroupId", int? seed = default);
member this.CrossValidate : Microsoft.ML.IDataView * Microsoft.ML.IEstimator<Microsoft.ML.ITransformer> * int * string * string * Nullable<int> -> System.Collections.Generic.IReadOnlyList<Microsoft.ML.TrainCatalogBase.CrossValidationResult<Microsoft.ML.Data.RankingMetrics>>
Public Function CrossValidate (data As IDataView, estimator As IEstimator(Of ITransformer), Optional numberOfFolds As Integer = 5, Optional labelColumnName As String = "Label", Optional rowGroupColumnName As String = "GroupId", Optional seed As Nullable(Of Integer) = Nothing) As IReadOnlyList(Of TrainCatalogBase.CrossValidationResult(Of RankingMetrics))
參數
- data
- IDataView
這些資料可以用來進行交叉驗證。
- estimator
- IEstimator<ITransformer>
估算器是為了配合。
- numberOfFolds
- Int32
交叉驗證摺疊次數。
- labelColumnName
- String
標籤欄位(用於評估)。
- rowGroupColumnName
- String
這是 中用於分組列的 groupId 欄位 data名稱。
若不進行列分組,該欄位將自動作為 SamplingKeyColumn 用於交叉驗證,因為排名演算法 null 要求如此。
傳回
按摺疊結果:指標、模型、評分資料集。