Skip to content

Commit 0ed9ec2

Browse files
committed
cookbook and revert datadebuggerpreview change
1 parent 6aa9911 commit 0ed9ec2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/code/MlNetCookBook.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,9 @@ var trainData = mlContext.Data.ReadFromTextFile<IrisInputAllFeatures>(dataPath,
629629
// Apply all kinds of standard ML.NET normalization to the raw features.
630630
var pipeline =
631631
mlContext.Transforms.Normalize(
632-
new NormalizingEstimator.MinMaxColumn("MinMaxNormalized", "Features", fixZero: true),
633-
new NormalizingEstimator.MeanVarColumn("MeanVarNormalized", "Features", fixZero: true),
634-
new NormalizingEstimator.BinningColumn("BinNormalized", "Features", numBins: 256));
632+
new NormalizingEstimator.MinMaxColumnOptions("MinMaxNormalized", "Features", fixZero: true),
633+
new NormalizingEstimator.MeanVarColumnOptions("MeanVarNormalized", "Features", fixZero: true),
634+
new NormalizingEstimator.BinningColumnOptions("BinNormalized", "Features", numBins: 256));
635635

636636
// Let's train our pipeline of normalizers, and then apply it to the same data.
637637
var normalizedData = pipeline.Fit(trainData).Transform(trainData);

src/Microsoft.ML.Data/DataDebuggerPreview.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ internal static class Defaults
2222
}
2323

2424
public DataViewSchema Schema { get; }
25-
public ImmutableArray<ColumnOptions> ColumnView { get; }
25+
public ImmutableArray<ColumnInfo> ColumnView { get; }
2626
public ImmutableArray<RowInfo> RowView { get; }
2727

2828
internal DataDebuggerPreview(IDataView data, int maxRows = Defaults.MaxRows)
@@ -56,7 +56,7 @@ internal DataDebuggerPreview(IDataView data, int maxRows = Defaults.MaxRows)
5656
}
5757
}
5858
RowView = rows.ToImmutableArray();
59-
ColumnView = Enumerable.Range(0, n).Select(c => new ColumnOptions(data.Schema[c], columns[c].ToArray())).ToImmutableArray();
59+
ColumnView = Enumerable.Range(0, n).Select(c => new ColumnInfo(data.Schema[c], columns[c].ToArray())).ToImmutableArray();
6060
}
6161

6262
public override string ToString()
@@ -94,14 +94,14 @@ internal RowInfo(int n)
9494
}
9595
}
9696

97-
public sealed class ColumnOptions
97+
public sealed class ColumnInfo
9898
{
9999
public DataViewSchema.Column Column { get; }
100100
public object[] Values { get; }
101101

102102
public override string ToString() => $"{Column.Name}: {Column.Type}";
103103

104-
internal ColumnOptions(DataViewSchema.Column column, object[] values)
104+
internal ColumnInfo(DataViewSchema.Column column, object[] values)
105105
{
106106
Column = column;
107107
Values = values;

0 commit comments

Comments
 (0)