语言

DataOperationsCatalog 类

定义

用于创建对数据进行操作但不属于模型训练管道的组件的类。 包括用于加载、保存、缓存、筛选、随机筛选和拆分数据的组件。

public sealed class DataOperationsCatalog
type DataOperationsCatalog = class
Public NotInheritable Class DataOperationsCatalog
继承
DataOperationsCatalog

方法

名称 说明
BootstrapSample(IDataView, Nullable<Int32>, Boolean)

获取一个大致的启动示例 input。

Cache(IDataView, String[])

创建延迟内存中缓存 。input

CreateEnumerable<TRow>(IDataView, Boolean, Boolean, SchemaDefinition)

将 a IDataView 转换为强类型 IEnumerable<T>。

CrossValidationSplit(IDataView, Int32, String, Nullable<Int32>)

将数据集拆分为训练集和测试集的交叉验证折叠。 samplingKeyColumnName尊重 if 提供。

FilterRowsByColumn(IDataView, String, Double, Double)

按数值列的值筛选数据集。

FilterRowsByKeyColumnFraction(IDataView, String, Double, Double)

按列的值 KeyDataViewType 筛选数据集。

FilterRowsByMissingValues(IDataView, String[])

删除包含 columns 缺失值的列所在的行。

LoadFromEnumerable<TRow>(IEnumerable<TRow>, DataViewSchema)

使用提供的DataViewSchema可枚举用户定义类型的项创建一个新IDataView项,其中可能包含有关架构的详细信息,而不是类型可以捕获的信息。

LoadFromEnumerable<TRow>(IEnumerable<TRow>, SchemaDefinition)

在用户定义的类型的项的可枚举项上创建新 IDataView 项。 用户保留其 data 所有权,生成的数据视图永远不会更改该 data视图的内容。 由于 IDataView 假定为不可变,因此用户应支持返回相同结果的 data 多个枚举,除非用户知道数据只游标一次。

流式处理数据视图的典型用法之一是:创建数据视图,以便根据需要延迟加载数据,然后将预先训练的转换应用到其中,然后游标浏览该视图以获取转换结果。

ShuffleRows(IDataView, Nullable<Int32>, Int32, Boolean)

对行 input进行随机排列。

SkipRows(IDataView, Int64)

跳过count行。input

TakeRows(IDataView, Int64)

从input中获取count行。

TrainTestSplit(IDataView, Double, String, Nullable<Int32>)

根据给定的分数将数据集拆分为训练集和测试集。 samplingKeyColumnName尊重 if 提供。

扩展方法

名称 说明
CreateDatabaseLoader(DataOperationsCatalog, DatabaseLoader+Column[])

创建数据库加载程序 DatabaseLoader。

CreateDatabaseLoader(DataOperationsCatalog, DatabaseLoader+Options)

创建数据库加载程序 DatabaseLoader。

CreateDatabaseLoader<TInput>(DataOperationsCatalog)

创建数据库加载程序 DatabaseLoader。

CreateSvmLightLoader(DataOperationsCatalog, Nullable<Int64>, Int32, Boolean, IMultiStreamSource)

创建加载 SVM 轻型格式化文件的加载程序。 SvmLightLoader。

CreateSvmLightLoaderWithFeatureNames(DataOperationsCatalog, Nullable<Int64>, IMultiStreamSource)

创建一个加载程序,它加载 SVM 光等文件,其中功能由其名称指定。

CreateTextLoader(DataOperationsCatalog, TextLoader+Column[], Char, Boolean, IMultiStreamSource, Boolean, Boolean, Boolean)

创建文本加载程序 TextLoader。

CreateTextLoader(DataOperationsCatalog, TextLoader+Options, IMultiStreamSource)

创建文本加载程序 TextLoader。

CreateTextLoader<TInput>(DataOperationsCatalog, Char, Boolean, IMultiStreamSource, Boolean, Boolean, Boolean)

通过从数据模型类型推断数据集架构来创建文本加载程序 TextLoader 。

CreateTextLoader<TInput>(DataOperationsCatalog, TextLoader+Options, IMultiStreamSource)

通过从数据模型类型推断数据集架构来创建文本加载程序 TextLoader 。

FilterByCustomPredicate<TSrc>(DataOperationsCatalog, IDataView, Func<TSrc,Boolean>)

删除指定谓词返回 true 的行。

FilterByStatefulCustomPredicate<TSrc,TState>(DataOperationsCatalog, IDataView, Func<TSrc,TState,Boolean>, Action<TState>)

删除指定谓词返回 true 的行。 此筛选器允许维护按游标状态。

LoadFromBinary(DataOperationsCatalog, IMultiStreamSource)

从IMultiStreamSource二进制文件加载 aIDataView。 请注意, IDataView这是懒惰的,因此此处不会发生实际加载,只需进行架构验证。

LoadFromBinary(DataOperationsCatalog, String)

从二进制文件加载。IDataView 请注意, IDataView这是懒惰的,因此此处不会发生实际加载,只需进行架构验证。

LoadFromSvmLightFile(DataOperationsCatalog, String, Nullable<Int64>, Int32, Boolean)

使用 < a0/> 从文本文件加载 。

LoadFromSvmLightFileWithFeatureNames(DataOperationsCatalog, String, Nullable<Int64>)

使用 IDataView 从包含功能名称 SvmLightLoader指定的功能的文本文件加载 。

LoadFromTextFile(DataOperationsCatalog, String, TextLoader+Column[], Char, Boolean, Boolean, Boolean, Boolean)

使用 < a0/> 从文本文件加载 。 请注意, IDataView这是懒惰的,因此此处不会发生实际加载,只需进行架构验证。

LoadFromTextFile(DataOperationsCatalog, String, TextLoader+Options)

使用 < a0/> 从文本文件加载 。 请注意, IDataView这是懒惰的,因此此处不会发生实际加载,只需进行架构验证。

LoadFromTextFile<TInput>(DataOperationsCatalog, String, Char, Boolean, Boolean, Boolean, Boolean)

使用 < a0/> 从文本文件加载 。 请注意, IDataView这是懒惰的,因此此处不会发生实际加载,只需进行架构验证。

LoadFromTextFile<TInput>(DataOperationsCatalog, String, TextLoader+Options)

使用 < a0/> 从文本文件加载 。 请注意, IDataView这是懒惰的,因此此处不会发生实际加载,只需进行架构验证。

SaveAsBinary(DataOperationsCatalog, IDataView, Stream, Boolean)

将该文件 IDataView 保存到二进制流中。

SaveAsText(DataOperationsCatalog, IDataView, Stream, Char, Boolean, Boolean, Boolean, Boolean)

另存为 IDataView 文本。

SaveInSvmLightFormat(DataOperationsCatalog, IDataView, Stream, Boolean, Boolean, String, String, String, String)

以 IDataView SVM-light 格式保存。 可以保存四列:标签和特征列,还可以选择保存组 ID 列和示例权重列。

适用于