-
Notifications
You must be signed in to change notification settings - Fork 31
/
CustomMappingCatalog.xml
239 lines (239 loc) · 21.3 KB
/
CustomMappingCatalog.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<Type Name="CustomMappingCatalog" FullName="Microsoft.ML.CustomMappingCatalog">
<TypeSignature Language="C#" Value="public static class CustomMappingCatalog" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit CustomMappingCatalog extends System.Object" />
<TypeSignature Language="DocId" Value="T:Microsoft.ML.CustomMappingCatalog" />
<TypeSignature Language="VB.NET" Value="Public Module CustomMappingCatalog" />
<TypeSignature Language="F#" Value="type CustomMappingCatalog = class" />
<AssemblyInfo>
<AssemblyName>Microsoft.ML.Transforms</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
Class containing an extension method for <see cref="T:Microsoft.ML.TransformsCatalog" /> to create instances of
user-defined one-to-one row mapping transformer components.
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="CustomMapping<TSrc,TDst>">
<MemberSignature Language="C#" Value="public static Microsoft.ML.Transforms.CustomMappingEstimator<TSrc,TDst> CustomMapping<TSrc,TDst> (this Microsoft.ML.TransformsCatalog catalog, Action<TSrc,TDst> mapAction, string contractName, Microsoft.ML.Data.SchemaDefinition inputSchemaDefinition = default, Microsoft.ML.Data.SchemaDefinition outputSchemaDefinition = default) where TSrc : class, new() where TDst : class, new();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Microsoft.ML.Transforms.CustomMappingEstimator`2<!!TSrc, !!TDst> CustomMapping<class .ctor TSrc, class .ctor TDst>(class Microsoft.ML.TransformsCatalog catalog, class System.Action`2<!!TSrc, !!TDst> mapAction, string contractName, class Microsoft.ML.Data.SchemaDefinition inputSchemaDefinition, class Microsoft.ML.Data.SchemaDefinition outputSchemaDefinition) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.ML.CustomMappingCatalog.CustomMapping``2(Microsoft.ML.TransformsCatalog,System.Action{``0,``1},System.String,Microsoft.ML.Data.SchemaDefinition,Microsoft.ML.Data.SchemaDefinition)" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function CustomMapping(Of TSrc As {Class, New}, TDst As {Class, New}) (catalog As TransformsCatalog, mapAction As Action(Of TSrc, TDst), contractName As String, Optional inputSchemaDefinition As SchemaDefinition = Nothing, Optional outputSchemaDefinition As SchemaDefinition = Nothing) As CustomMappingEstimator(Of TSrc, TDst)" />
<MemberSignature Language="F#" Value="static member CustomMapping : Microsoft.ML.TransformsCatalog * Action<'Src, 'Dst (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst))> * string * Microsoft.ML.Data.SchemaDefinition * Microsoft.ML.Data.SchemaDefinition -> Microsoft.ML.Transforms.CustomMappingEstimator<'Src, 'Dst (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst))> (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst))" Usage="Microsoft.ML.CustomMappingCatalog.CustomMapping (catalog, mapAction, contractName, inputSchemaDefinition, outputSchemaDefinition)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.ML.Transforms</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.ML.Transforms.CustomMappingEstimator<TSrc,TDst></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TSrc">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<ParameterAttribute>ReferenceTypeConstraint</ParameterAttribute>
</Constraints>
</TypeParameter>
<TypeParameter Name="TDst">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<ParameterAttribute>ReferenceTypeConstraint</ParameterAttribute>
</Constraints>
</TypeParameter>
</TypeParameters>
<Parameters>
<Parameter Name="catalog" Type="Microsoft.ML.TransformsCatalog" RefType="this" />
<Parameter Name="mapAction" Type="System.Action<TSrc,TDst>" />
<Parameter Name="contractName" Type="System.String" />
<Parameter Name="inputSchemaDefinition" Type="Microsoft.ML.Data.SchemaDefinition" />
<Parameter Name="outputSchemaDefinition" Type="Microsoft.ML.Data.SchemaDefinition" />
</Parameters>
<Docs>
<typeparam name="TSrc">The class defining which columns to take from the incoming data.</typeparam>
<typeparam name="TDst">The class defining which new columns are added to the data.</typeparam>
<param name="catalog">The transform catalog</param>
<param name="mapAction">The mapping action. This must be thread-safe and free from side effects.
If the resulting transformer needs to be save-able, the class defining <paramref name="mapAction" /> should implement
<see cref="T:Microsoft.ML.Transforms.CustomMappingFactory`2" /> and needs to be decorated with
<see cref="T:Microsoft.ML.Transforms.CustomMappingFactoryAttributeAttribute" /> with the provided <paramref name="contractName" />.
In versions v1.5-preview2 and earlier, the assembly containing the class should be registered in the environment where it is loaded back
using <see cref="M:Microsoft.ML.Runtime.ComponentCatalog.RegisterAssembly(System.Reflection.Assembly,System.Boolean)" />.</param>
<param name="contractName">The contract name, used by ML.NET for loading the model.
If <see langword="null" /> is specified, resulting transformer would not be save-able.</param>
<param name="inputSchemaDefinition">Additional parameters for schema mapping between <typeparamref name="TSrc" /> and input data.
Useful when dealing with annotations.</param>
<param name="outputSchemaDefinition">Additional parameters for schema mapping between <typeparamref name="TDst" /> and output data.
Useful when dealing with annotations.</param>
<summary>
Create a <see cref="T:Microsoft.ML.Transforms.CustomMappingEstimator`2" />, which applies a custom mapping of input columns to output columns.
</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<example>
<format type="text/markdown"><![CDATA[
[!code-csharp[CustomMapping](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/CustomMapping.cs)]
[!code-csharp[CustomMapping](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/CustomMappingSaveAndLoad.cs)]
[!code-csharp[CustomMapping](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/CustomMappingWithInMemoryCustomType.cs)]
]]></format>
</example>
</Docs>
</Member>
<Member MemberName="FilterByCustomPredicate<TSrc>">
<MemberSignature Language="C#" Value="public static Microsoft.ML.IDataView FilterByCustomPredicate<TSrc> (this Microsoft.ML.DataOperationsCatalog catalog, Microsoft.ML.IDataView input, Func<TSrc,bool> filterPredicate) where TSrc : class, new();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Microsoft.ML.IDataView FilterByCustomPredicate<class .ctor TSrc>(class Microsoft.ML.DataOperationsCatalog catalog, class Microsoft.ML.IDataView input, class System.Func`2<!!TSrc, bool> filterPredicate) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.ML.CustomMappingCatalog.FilterByCustomPredicate``1(Microsoft.ML.DataOperationsCatalog,Microsoft.ML.IDataView,System.Func{``0,System.Boolean})" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function FilterByCustomPredicate(Of TSrc As {Class, New}) (catalog As DataOperationsCatalog, input As IDataView, filterPredicate As Func(Of TSrc, Boolean)) As IDataView" />
<MemberSignature Language="F#" Value="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))" Usage="Microsoft.ML.CustomMappingCatalog.FilterByCustomPredicate (catalog, input, filterPredicate)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.ML.Transforms</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.ML.IDataView</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TSrc">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<ParameterAttribute>ReferenceTypeConstraint</ParameterAttribute>
</Constraints>
</TypeParameter>
</TypeParameters>
<Parameters>
<Parameter Name="catalog" Type="Microsoft.ML.DataOperationsCatalog" RefType="this" Index="0" FrameworkAlternate="ml-dotnet;ml-dotnet-1.5.0;ml-dotnet-1.6.0;ml-dotnet-1.7.0;ml-dotnet-2.0.0" />
<Parameter Name="input" Type="Microsoft.ML.IDataView" Index="1" FrameworkAlternate="ml-dotnet;ml-dotnet-1.5.0;ml-dotnet-1.6.0;ml-dotnet-1.7.0;ml-dotnet-2.0.0" />
<Parameter Name="filterPredicate" Type="System.Func<TSrc,System.Boolean>" Index="2" FrameworkAlternate="ml-dotnet;ml-dotnet-1.5.0;ml-dotnet-1.6.0;ml-dotnet-1.7.0;ml-dotnet-2.0.0" />
</Parameters>
<Docs>
<typeparam name="TSrc">The class defining which columns to take from the incoming data.</typeparam>
<param name="catalog">The data operations catalog.</param>
<param name="input">The input data.</param>
<param name="filterPredicate">A predicate, that takes an input of type <typeparamref name="TSrc" /> and returns true if the row should be filtered (dropped) and false otherwise.</param>
<summary>
Drop rows where a specified predicate returns true.
</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="FilterByStatefulCustomPredicate<TSrc,TState>">
<MemberSignature Language="C#" Value="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();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Microsoft.ML.IDataView FilterByStatefulCustomPredicate<class .ctor TSrc, class .ctor TState>(class Microsoft.ML.DataOperationsCatalog catalog, class Microsoft.ML.IDataView input, class System.Func`3<!!TSrc, !!TState, bool> filterPredicate, class System.Action`1<!!TState> stateInitAction) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.ML.CustomMappingCatalog.FilterByStatefulCustomPredicate``2(Microsoft.ML.DataOperationsCatalog,Microsoft.ML.IDataView,System.Func{``0,``1,System.Boolean},System.Action{``1})" />
<MemberSignature Language="VB.NET" Value="<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" />
<MemberSignature Language="F#" Value="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))" Usage="Microsoft.ML.CustomMappingCatalog.FilterByStatefulCustomPredicate (catalog, input, filterPredicate, stateInitAction)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.ML.Transforms</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.ML.IDataView</ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TSrc">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<ParameterAttribute>ReferenceTypeConstraint</ParameterAttribute>
</Constraints>
</TypeParameter>
<TypeParameter Name="TState">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<ParameterAttribute>ReferenceTypeConstraint</ParameterAttribute>
</Constraints>
</TypeParameter>
</TypeParameters>
<Parameters>
<Parameter Name="catalog" Type="Microsoft.ML.DataOperationsCatalog" RefType="this" Index="0" FrameworkAlternate="ml-dotnet;ml-dotnet-1.5.0;ml-dotnet-1.6.0;ml-dotnet-1.7.0;ml-dotnet-2.0.0" />
<Parameter Name="input" Type="Microsoft.ML.IDataView" Index="1" FrameworkAlternate="ml-dotnet;ml-dotnet-1.5.0;ml-dotnet-1.6.0;ml-dotnet-1.7.0;ml-dotnet-2.0.0" />
<Parameter Name="filterPredicate" Type="System.Func<TSrc,TState,System.Boolean>" Index="2" FrameworkAlternate="ml-dotnet;ml-dotnet-1.5.0;ml-dotnet-1.6.0;ml-dotnet-1.7.0;ml-dotnet-2.0.0" />
<Parameter Name="stateInitAction" Type="System.Action<TState>" Index="3" FrameworkAlternate="ml-dotnet;ml-dotnet-1.5.0;ml-dotnet-1.6.0;ml-dotnet-1.7.0;ml-dotnet-2.0.0" />
</Parameters>
<Docs>
<typeparam name="TSrc">The class defining which columns to take from the incoming data.</typeparam>
<typeparam name="TState">The type that describes per-cursor state.</typeparam>
<param name="catalog">The data operations catalog.</param>
<param name="input">The input data.</param>
<param name="filterPredicate">A predicate, that takes an input of type <typeparamref name="TSrc" /> and a state object of type
<typeparamref name="TState" />, and returns true if the row should be filtered (dropped) and false otherwise.</param>
<param name="stateInitAction">The action to initialize the state object, that is called once before the cursor is initialized.</param>
<summary>
Drop rows where a specified predicate returns true. This filter allows to maintain a per-cursor state.
</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="StatefulCustomMapping<TSrc,TDst,TState>">
<MemberSignature Language="C#" Value="public static Microsoft.ML.Transforms.StatefulCustomMappingEstimator<TSrc,TDst,TState> StatefulCustomMapping<TSrc,TDst,TState> (this Microsoft.ML.TransformsCatalog catalog, Action<TSrc,TDst,TState> mapAction, Action<TState> stateInitAction, string contractName) where TSrc : class, new() where TDst : class, new() where TState : class, new();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class Microsoft.ML.Transforms.StatefulCustomMappingEstimator`3<!!TSrc, !!TDst, !!TState> StatefulCustomMapping<class .ctor TSrc, class .ctor TDst, class .ctor TState>(class Microsoft.ML.TransformsCatalog catalog, class System.Action`3<!!TSrc, !!TDst, !!TState> mapAction, class System.Action`1<!!TState> stateInitAction, string contractName) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.ML.CustomMappingCatalog.StatefulCustomMapping``3(Microsoft.ML.TransformsCatalog,System.Action{``0,``1,``2},System.Action{``2},System.String)" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Function StatefulCustomMapping(Of TSrc As {Class, New}, TDst As {Class, New}, TState As {Class, New}) (catalog As TransformsCatalog, mapAction As Action(Of TSrc, TDst, TState), stateInitAction As Action(Of TState), contractName As String) As StatefulCustomMappingEstimator(Of TSrc, TDst, TState)" />
<MemberSignature Language="F#" Value="static member StatefulCustomMapping : Microsoft.ML.TransformsCatalog * Action<'Src, 'Dst, 'State (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst) and 'State : null and 'State : (new : unit -> 'State))> * Action<'State (requires 'State : null and 'State : (new : unit -> 'State))> * string -> Microsoft.ML.Transforms.StatefulCustomMappingEstimator<'Src, 'Dst, 'State (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst) and 'State : null and 'State : (new : unit -> 'State))> (requires 'Src : null and 'Src : (new : unit -> 'Src) and 'Dst : null and 'Dst : (new : unit -> 'Dst) and 'State : null and 'State : (new : unit -> 'State))" Usage="Microsoft.ML.CustomMappingCatalog.StatefulCustomMapping (catalog, mapAction, stateInitAction, contractName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.ML.Transforms</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.ML.Transforms.StatefulCustomMappingEstimator<TSrc,TDst,TState></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TSrc">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<ParameterAttribute>ReferenceTypeConstraint</ParameterAttribute>
</Constraints>
</TypeParameter>
<TypeParameter Name="TDst">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<ParameterAttribute>ReferenceTypeConstraint</ParameterAttribute>
</Constraints>
</TypeParameter>
<TypeParameter Name="TState">
<Constraints>
<ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute>
<ParameterAttribute>ReferenceTypeConstraint</ParameterAttribute>
</Constraints>
</TypeParameter>
</TypeParameters>
<Parameters>
<Parameter Name="catalog" Type="Microsoft.ML.TransformsCatalog" RefType="this" Index="0" FrameworkAlternate="ml-dotnet;ml-dotnet-1.5.0;ml-dotnet-1.6.0;ml-dotnet-1.7.0;ml-dotnet-2.0.0" />
<Parameter Name="mapAction" Type="System.Action<TSrc,TDst,TState>" Index="1" FrameworkAlternate="ml-dotnet;ml-dotnet-1.5.0;ml-dotnet-1.6.0;ml-dotnet-1.7.0;ml-dotnet-2.0.0" />
<Parameter Name="stateInitAction" Type="System.Action<TState>" Index="2" FrameworkAlternate="ml-dotnet;ml-dotnet-1.5.0;ml-dotnet-1.6.0;ml-dotnet-1.7.0;ml-dotnet-2.0.0" />
<Parameter Name="contractName" Type="System.String" Index="3" FrameworkAlternate="ml-dotnet;ml-dotnet-1.5.0;ml-dotnet-1.6.0;ml-dotnet-1.7.0;ml-dotnet-2.0.0" />
</Parameters>
<Docs>
<typeparam name="TSrc">The class defining which columns to take from the incoming data.</typeparam>
<typeparam name="TDst">The class defining which new columns are added to the data.</typeparam>
<typeparam name="TState">The type that describes per-cursor state.</typeparam>
<param name="catalog">The transform catalog.</param>
<param name="mapAction">The mapping action. In addition to the input and output objects, the action is given a state object that it can look at and/or modify.
If the resulting transformer needs to be save-able, the class defining <paramref name="mapAction" /> should implement
<see cref="T:Microsoft.ML.Transforms.StatefulCustomMappingFactory`3" /> and needs to be decorated with
<see cref="T:Microsoft.ML.Transforms.CustomMappingFactoryAttributeAttribute" /> with the provided <paramref name="contractName" />.
The assembly containing the class should be registered in the environment where it is loaded back
using <see cref="M:Microsoft.ML.Runtime.ComponentCatalog.RegisterAssembly(System.Reflection.Assembly,System.Boolean)" />.</param>
<param name="stateInitAction">The action to initialize the state object, that is called once before the cursor is initialized.</param>
<param name="contractName">The contract name, used by ML.NET for loading the model.
If <see langword="null" /> is specified, resulting transformer would not be save-able.</param>
<summary>
Create a <see cref="T:Microsoft.ML.Transforms.StatefulCustomMappingEstimator`3" />, which applies a custom mapping of input columns to output columns,
while allowing a per-cursor state.
</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>