ClusteringCatalog.CrossValidate 方法

定义

通过折叠(如果提供)estimator和尊重samplingKeyColumnNamedata运行交叉验证numberOfFolds。 然后,根据 labelColumnName 每个子模型评估并返回指标。

public System.Collections.Generic.IReadOnlyList<Microsoft.ML.TrainCatalogBase.CrossValidationResult<Microsoft.ML.Data.ClusteringMetrics>> CrossValidate (Microsoft.ML.IDataView data, Microsoft.ML.IEstimator<Microsoft.ML.ITransformer> estimator, int numberOfFolds = 5, string labelColumnName = default, string featuresColumnName = default, string samplingKeyColumnName = default, int? seed = default);
member this.CrossValidate : Microsoft.ML.IDataView * Microsoft.ML.IEstimator<Microsoft.ML.ITransformer> * int * string * string * string * Nullable<int> -> System.Collections.Generic.IReadOnlyList<Microsoft.ML.TrainCatalogBase.CrossValidationResult<Microsoft.ML.Data.ClusteringMetrics>>
Public Function CrossValidate (data As IDataView, estimator As IEstimator(Of ITransformer), Optional numberOfFolds As Integer = 5, Optional labelColumnName As String = Nothing, Optional featuresColumnName As String = Nothing, Optional samplingKeyColumnName As String = Nothing, Optional seed As Nullable(Of Integer) = Nothing) As IReadOnlyList(Of TrainCatalogBase.CrossValidationResult(Of ClusteringMetrics))

参数

data
IDataView

要运行交叉验证的数据。

estimator
IEstimator<ITransformer>

要适应的估算器。

numberOfFolds
Int32

交叉验证折叠数。

labelColumnName
String

用于评估 (群集任务的可选标签列可能并不总是具有标签) 。

featuresColumnName
String

用于计算 Dbi 指标) 所需的评估 (的可选功能列

samplingKeyColumnName
String

用于对行进行分组的列的名称。 如果两个示例具有相同的值 samplingKeyColumnName,则保证它们出现在 (训练或测试) 的同一子集中。 这可用于确保不会从训练泄漏到测试集。 如果未 null 执行行分组。

seed
Nullable<Int32>

用于选择交叉验证折叠的行的随机数生成器的种子。

返回

适用于