/
CountFeatureSelectingEstimator.xml
128 lines (121 loc) · 7.4 KB
/
CountFeatureSelectingEstimator.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
<Type Name="CountFeatureSelectingEstimator" FullName="Microsoft.ML.Transforms.CountFeatureSelectingEstimator">
<TypeSignature Language="C#" Value="public sealed class CountFeatureSelectingEstimator : Microsoft.ML.IEstimator<Microsoft.ML.ITransformer>" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit CountFeatureSelectingEstimator extends System.Object implements class Microsoft.ML.IEstimator`1<class Microsoft.ML.ITransformer>" />
<TypeSignature Language="DocId" Value="T:Microsoft.ML.Transforms.CountFeatureSelectingEstimator" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class CountFeatureSelectingEstimator
Implements IEstimator(Of ITransformer)" />
<TypeSignature Language="F#" Value="type CountFeatureSelectingEstimator = class
 interface IEstimator<ITransformer>" />
<AssemblyInfo>
<AssemblyName>Microsoft.ML.Transforms</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>Microsoft.ML.IEstimator<Microsoft.ML.ITransformer></InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>
Selects the slots for which the count of non-default values is greater than or equal to a threshold.
</summary>
<remarks>
<format type="text/markdown"><![CDATA[
### Estimator Characteristics
| | |
| -- | -- |
| Does this estimator need to look at the data to train its parameters? | Yes |
| Input column data type | Vector or scalar of <xref:System.Single>, <xref:System.Double> or [text](xref:Microsoft.ML.Data.TextDataViewType) data types|
| Output column data type | Same as the input column|
| Exportable to ONNX | Yes |
This transform uses a set of aggregators to count the number of values for each slot (vector element)
that are non-default and non-missing (for the definitions of default and missing, refer to the remarks section
in <xref:Microsoft.ML.Data.DataKind>). If the count value is less than the provided count parameter, that slot is dropped.
This transform is useful when applied together with a <xref:Microsoft.ML.Transforms.OneHotHashEncodingTransformer>.
It can remove the features generated by the hash transform that have no data in the examples.
For example, if we set the count parameter to 3 and fit the estimator, apply the transformer to the following Features column,
we would see the second slot, containing: NaN (missing value), 5, 5, 0 (default value) values being dropped because that slot
has only two non-default and non-missing values, i.e. the two 5 values.
The third slot is being kept, because it has the values 6, 6, 6, NaN; so it has 3 non-default and non-missing.
| Features |
| -- |
|4,NaN,6 |
|4,5,6 |
|4,5,6 |
|4,0,NaN|
This is how the dataset above would look, after the transformation.
| Features |
| -- |
|4,6 |
|4,6 |
|4,6 |
|4,NaN|
Check the See Also section for links to usage examples.
]]></format>
</remarks>
<altmember cref="M:Microsoft.ML.FeatureSelectionCatalog.SelectFeaturesBasedOnCount(Microsoft.ML.TransformsCatalog.FeatureSelectionTransforms,System.String,System.String,System.Int64)" />
<altmember cref="M:Microsoft.ML.FeatureSelectionCatalog.SelectFeaturesBasedOnCount(Microsoft.ML.TransformsCatalog.FeatureSelectionTransforms,Microsoft.ML.InputOutputColumnPair[],System.Int64)" />
</Docs>
<Members>
<Member MemberName="Fit">
<MemberSignature Language="C#" Value="public Microsoft.ML.ITransformer Fit (Microsoft.ML.IDataView input);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.ML.ITransformer Fit(class Microsoft.ML.IDataView input) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.ML.Transforms.CountFeatureSelectingEstimator.Fit(Microsoft.ML.IDataView)" />
<MemberSignature Language="VB.NET" Value="Public Function Fit (input As IDataView) As ITransformer" />
<MemberSignature Language="F#" Value="abstract member Fit : Microsoft.ML.IDataView -> Microsoft.ML.ITransformer
override this.Fit : Microsoft.ML.IDataView -> Microsoft.ML.ITransformer" Usage="countFeatureSelectingEstimator.Fit input" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.ML.IEstimator`1.Fit(Microsoft.ML.IDataView)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.ML.Transforms</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.ML.ITransformer</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="input" Type="Microsoft.ML.IDataView" />
</Parameters>
<Docs>
<param name="input">To be added.</param>
<summary>
Trains and returns a <see cref="T:Microsoft.ML.ITransformer" />.
</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetOutputSchema">
<MemberSignature Language="C#" Value="public Microsoft.ML.SchemaShape GetOutputSchema (Microsoft.ML.SchemaShape inputSchema);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.ML.SchemaShape GetOutputSchema(class Microsoft.ML.SchemaShape inputSchema) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.ML.Transforms.CountFeatureSelectingEstimator.GetOutputSchema(Microsoft.ML.SchemaShape)" />
<MemberSignature Language="VB.NET" Value="Public Function GetOutputSchema (inputSchema As SchemaShape) As SchemaShape" />
<MemberSignature Language="F#" Value="abstract member GetOutputSchema : Microsoft.ML.SchemaShape -> Microsoft.ML.SchemaShape
override this.GetOutputSchema : Microsoft.ML.SchemaShape -> Microsoft.ML.SchemaShape" Usage="countFeatureSelectingEstimator.GetOutputSchema inputSchema" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.ML.IEstimator`1.GetOutputSchema(Microsoft.ML.SchemaShape)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.ML.Transforms</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.ML.SchemaShape</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="inputSchema" Type="Microsoft.ML.SchemaShape" />
</Parameters>
<Docs>
<param name="inputSchema">To be added.</param>
<summary>
Returns the <see cref="T:Microsoft.ML.SchemaShape" /> of the schema which will be produced by the transformer.
Used for schema propagation and verification in a pipeline.
</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>