Skip to content

Commit 0c415ef

Browse files
committed
adding docs and made constructors internal
1 parent 0053658 commit 0c415ef

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

src/Microsoft.ML.Data/Transforms/KeyToValue.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ private static VersionInfo GetVersionInfo()
8686
/// <summary>
8787
/// Create a <see cref="KeyToValueMappingTransformer"/> that takes and transforms one column.
8888
/// </summary>
89-
public KeyToValueMappingTransformer(IHostEnvironment env, string columnName)
89+
internal KeyToValueMappingTransformer(IHostEnvironment env, string columnName)
9090
: this(env, (columnName, columnName))
9191
{
9292
}
9393

9494
/// <summary>
9595
/// Create a <see cref="KeyToValueMappingTransformer"/> that takes multiple pairs of columns.
9696
/// </summary>
97-
public KeyToValueMappingTransformer(IHostEnvironment env, params (string outputColumnName, string inputColumnName)[] columns)
97+
internal KeyToValueMappingTransformer(IHostEnvironment env, params (string outputColumnName, string inputColumnName)[] columns)
9898
: base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueMappingTransformer)), columns)
9999
{
100100
}
@@ -516,6 +516,10 @@ internal KeyToValueMappingEstimator(IHostEnvironment env, params (string outputC
516516
{
517517
}
518518

519+
/// <summary>
520+
/// Returns the shape of the schema which will be produced by the transformer.
521+
/// Used for schema propagation and verification in a pipeline.
522+
/// </summary>
519523
public override SchemaShape GetOutputSchema(SchemaShape inputSchema)
520524
{
521525
Host.CheckValue(inputSchema, nameof(inputSchema));

src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs

+7
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,15 @@ internal ValueToKeyMappingEstimator(IHostEnvironment env, ColumnInfo[] columns,
105105
_keyData = keyData;
106106
}
107107

108+
/// <summary>
109+
/// Fit to the <paramref name="input"/> data and build the dictionaries used for mapping.
110+
/// </summary>
108111
public ValueToKeyMappingTransformer Fit(IDataView input) => new ValueToKeyMappingTransformer(_host, input, _columns, _keyData, false);
109112

113+
/// <summary>
114+
/// Returns the shape of the schema which will be produced by the transformer.
115+
/// Used for schema propagation and verification in a pipeline.
116+
/// </summary>
110117
public SchemaShape GetOutputSchema(SchemaShape inputSchema)
111118
{
112119
_host.CheckValue(inputSchema, nameof(inputSchema));

src/Microsoft.ML.Transforms/OneHotEncoding.cs

+4
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ internal OneHotEncodingEstimator(IHostEnvironment env, ColumnInfo[] columns, IDa
275275
}
276276
}
277277

278+
/// <summary>
279+
/// Returns the shape of the schema which will be produced by the transformer.
280+
/// Used for schema propagation and verification in a pipeline.
281+
/// </summary>
278282
public SchemaShape GetOutputSchema(SchemaShape inputSchema)
279283
{
280284
if (_toSomething != null)

0 commit comments

Comments
 (0)