@@ -383,7 +383,7 @@ public static IDataView AddKeyColumn<TSrc>(IHostEnvironment env, IDataView input
383
383
384
384
/// <summary>
385
385
/// This method takes an array of data views and a specified input vector column, and adds a new output column to each of the data views.
386
- /// First, we find the union set of the slot names in the different data views. Next we define a new vector column for each
386
+ /// First, we find the union set of the slot names in the different data views. Next we define a new vector column for each
387
387
/// data view, indexed by the union of the slot names. For each data view, every slot value is the value in the slot corresponding
388
388
/// to its slot name in the original column. If a reconciled slot name does not exist in an input column, the value in the output
389
389
/// column is def.
@@ -530,7 +530,7 @@ private static int[][] MapKeys(ISchema[] schemas, string columnName, bool isVec,
530
530
531
531
/// <summary>
532
532
/// This method takes an array of data views and a specified input key column, and adds a new output column to each of the data views.
533
- /// First, we find the union set of the key values in the different data views. Next we define a new key column for each
533
+ /// First, we find the union set of the key values in the different data views. Next we define a new key column for each
534
534
/// data view, with the union of the key values as the new key values. For each data view, the value in the output column is the value
535
535
/// corresponding to the key value in the original column.
536
536
/// </summary>
@@ -801,8 +801,8 @@ public static string GetPerFoldResults(IHostEnvironment env, IDataView fold, out
801
801
}
802
802
803
803
// This method returns a string representation of a set of metrics. If there are stratification columns, it looks for columns named
804
- // StratCol and StratVal, and outputs the metrics in the rows with NA in the StratCol column. If weighted is true, it looks
805
- // for a DvBool column named "IsWeighted" and outputs the metrics in the rows with a value of true in that column.
804
+ // StratCol and StratVal, and outputs the metrics in the rows with NA in the StratCol column. If weighted is true, it looks
805
+ // for a DvBool column named "IsWeighted" and outputs the metrics in the rows with a value of true in that column.
806
806
// If nonAveragedCols is non-null, it computes the average and standard deviation over all the relevant rows and populates
807
807
// nonAveragedCols with columns that are either hidden, or are not of a type that we can display (i.e., either a numeric column,
808
808
// or a known length vector of doubles).
@@ -926,8 +926,8 @@ private static string GetMetricsAsString(IHostEnvironment env, IDataView data, b
926
926
if ( average )
927
927
{
928
928
Contracts . AssertValue ( sumSqMetrics ) ;
929
- sb . AppendLine ( string . Format ( " ({0:N4})" , numResults == 1 ? 0 :
930
- Math . Sqrt ( sumSqMetrics [ i ] / numResults - avgMetrics [ i ] * avgMetrics [ i ] ) ) ) ;
929
+ sb . AppendFormat ( CultureInfo . InvariantCulture , " ({0:N4})" , numResults == 1 ? 0 :
930
+ Math . Sqrt ( sumSqMetrics [ i ] / numResults - avgMetrics [ i ] * avgMetrics [ i ] ) ) . AppendLine ( ) ;
931
931
}
932
932
else
933
933
sb . AppendLine ( ) ;
@@ -1026,7 +1026,7 @@ private static List<string> GetMetricNames(IChannel ch, ISchema schema, IRow row
1026
1026
Contracts . Assert ( Utils . Size ( vBufferGetters ) == schema . ColumnCount ) ;
1027
1027
1028
1028
// Get the names of the metrics. For R8 valued columns the metric name is the column name. For R8 vector valued columns
1029
- // the names of the metrics are the column name, followed by the slot name if it exists, or "Label_i" if it doesn't.
1029
+ // the names of the metrics are the column name, followed by the slot name if it exists, or "Label_i" if it doesn't.
1030
1030
VBuffer < DvText > names = default ( VBuffer < DvText > ) ;
1031
1031
int metricCount = 0 ;
1032
1032
var metricNames = new List < string > ( ) ;
@@ -1121,7 +1121,7 @@ private static string GetConfusionTableAsString(double[][] confusionTable, doubl
1121
1121
var numFalseNeg = confusionTable [ 0 ] [ 1 ] ;
1122
1122
var numTrueNeg = confusionTable [ 1 ] [ 1 ] ;
1123
1123
var numFalsePos = confusionTable [ 1 ] [ 0 ] ;
1124
- sb . AppendFormat ( "{0}TEST {1} RATIO:\t {2:N4} ({3:F1}/({3:F1}+{4:F1}))" , prefix , positiveCaps ,
1124
+ sb . AppendFormat ( CultureInfo . InvariantCulture , "{0}TEST {1} RATIO:\t {2:N4} ({3:F1}/({3:F1}+{4:F1}))" , prefix , positiveCaps ,
1125
1125
1.0 * ( numTruePos + numFalseNeg ) / ( numTruePos + numTrueNeg + numFalseNeg + numFalsePos ) ,
1126
1126
numTruePos + numFalseNeg , numFalsePos + numTrueNeg ) ;
1127
1127
}
@@ -1154,9 +1154,9 @@ private static string GetConfusionTableAsString(double[][] confusionTable, doubl
1154
1154
{
1155
1155
sb . AppendFormat ( rowLabelFormat , i , predictedLabelNames [ i ] ) ;
1156
1156
for ( int j = 0 ; j < numLabels ; j ++ )
1157
- sb . AppendFormat ( format2 , confusionTable [ i ] [ j ] ) ;
1157
+ sb . AppendFormat ( CultureInfo . InvariantCulture , format2 , confusionTable [ i ] [ j ] ) ;
1158
1158
Double recall = rowSums [ i ] > 0 ? confusionTable [ i ] [ i ] / rowSums [ i ] : 0 ;
1159
- sb . AppendFormat ( " {0,5:F4}" , recall ) ;
1159
+ sb . AppendFormat ( CultureInfo . InvariantCulture , " {0,5:F4}" , recall ) ;
1160
1160
sb . AppendLine ( ) ;
1161
1161
}
1162
1162
sb . AppendFormat ( " {0}||" , pad ) ;
@@ -1168,7 +1168,7 @@ private static string GetConfusionTableAsString(double[][] confusionTable, doubl
1168
1168
for ( int i = 0 ; i < numLabels ; i ++ )
1169
1169
{
1170
1170
Double precision = columnSums [ i ] > 0 ? confusionTable [ i ] [ i ] / columnSums [ i ] : 0 ;
1171
- sb . AppendFormat ( format , precision ) ;
1171
+ sb . AppendFormat ( CultureInfo . InvariantCulture , format , precision ) ;
1172
1172
}
1173
1173
sb . AppendLine ( ) ;
1174
1174
return sb . ToString ( ) ;
0 commit comments