Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Microsoft.Data.Analysis/GroupBy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public GroupBy(DataFrame dataFrame, int groupByColumnIndex, IDictionary<TKey, IC
throw new ArgumentException(nameof(groupByColumnIndex));
_groupByColumnIndex = groupByColumnIndex;
_keyToRowIndicesMap = keyToRowIndices ?? throw new ArgumentException(nameof(keyToRowIndices));
_dataFrame = dataFrame ?? throw new ArgumentException(nameof(dataFrame));
_dataFrame = dataFrame;
}

private delegate void ColumnDelegate(int columnIndex, long rowIndex, ICollection<long> rows, TKey key, bool firstGroup);
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Data.Analysis/StringDataFrameColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ private StringDataFrameColumn Clone(PrimitiveDataFrameColumn<long> mapIndices =
{
if (mapIndices is null)
{
StringDataFrameColumn ret = new StringDataFrameColumn(Name, mapIndices is null ? Length : mapIndices.Length);
StringDataFrameColumn ret = new StringDataFrameColumn(Name, Length);
for (long i = 0; i < Length; i++)
{
ret[i] = this[i];
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ private void GetPredictedLabelCore(float score, ref bool value)

private void GetPredictedLabelCoreAsKey(float score, ref uint value)
{
value = (uint)(score > _threshold ? 2 : score <= _threshold ? 1 : 0);
value = (uint)(score > _threshold ? 2 : 1);
}

private protected override JToken PredictedLabelPfa(string[] mapperOutputs)
Expand Down
12 changes: 1 addition & 11 deletions src/Microsoft.ML.Maml/MAML.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,8 @@ private static int MainWithProgress(string args)

private static ConsoleEnvironment CreateEnvironment()
{
string sensitivityString = null;
MessageSensitivity sensitivity = MessageSensitivity.All;
if (!string.IsNullOrWhiteSpace(sensitivityString))
{
// Cannot use host or channels since the environment isn't even
// created yet.
if (!Enum.TryParse(sensitivityString, out sensitivity))
{
Console.Error.WriteLine("Cannot parse '{0}' as {1}", sensitivityString, nameof(MessageSensitivity));
sensitivity = MessageSensitivity.All;
}
}

return new ConsoleEnvironment(sensitivity: sensitivity);
}

Expand Down