@@ -383,7 +383,7 @@ public static IDataView AddKeyColumn<TSrc>(IHostEnvironment env, IDataView input
383383
384384 /// <summary>
385385 /// 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
387387 /// data view, indexed by the union of the slot names. For each data view, every slot value is the value in the slot corresponding
388388 /// 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
389389 /// column is def.
@@ -530,7 +530,7 @@ private static int[][] MapKeys(ISchema[] schemas, string columnName, bool isVec,
530530
531531 /// <summary>
532532 /// 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
534534 /// 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
535535 /// corresponding to the key value in the original column.
536536 /// </summary>
@@ -801,8 +801,8 @@ public static string GetPerFoldResults(IHostEnvironment env, IDataView fold, out
801801 }
802802
803803 // 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.
806806 // If nonAveragedCols is non-null, it computes the average and standard deviation over all the relevant rows and populates
807807 // nonAveragedCols with columns that are either hidden, or are not of a type that we can display (i.e., either a numeric column,
808808 // or a known length vector of doubles).
@@ -926,8 +926,8 @@ private static string GetMetricsAsString(IHostEnvironment env, IDataView data, b
926926 if ( average )
927927 {
928928 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 ( ) ;
931931 }
932932 else
933933 sb . AppendLine ( ) ;
@@ -1026,7 +1026,7 @@ private static List<string> GetMetricNames(IChannel ch, ISchema schema, IRow row
10261026 Contracts . Assert ( Utils . Size ( vBufferGetters ) == schema . ColumnCount ) ;
10271027
10281028 // 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.
10301030 VBuffer < DvText > names = default ( VBuffer < DvText > ) ;
10311031 int metricCount = 0 ;
10321032 var metricNames = new List < string > ( ) ;
@@ -1121,7 +1121,7 @@ private static string GetConfusionTableAsString(double[][] confusionTable, doubl
11211121 var numFalseNeg = confusionTable [ 0 ] [ 1 ] ;
11221122 var numTrueNeg = confusionTable [ 1 ] [ 1 ] ;
11231123 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 ,
11251125 1.0 * ( numTruePos + numFalseNeg ) / ( numTruePos + numTrueNeg + numFalseNeg + numFalsePos ) ,
11261126 numTruePos + numFalseNeg , numFalsePos + numTrueNeg ) ;
11271127 }
@@ -1154,9 +1154,9 @@ private static string GetConfusionTableAsString(double[][] confusionTable, doubl
11541154 {
11551155 sb . AppendFormat ( rowLabelFormat , i , predictedLabelNames [ i ] ) ;
11561156 for ( int j = 0 ; j < numLabels ; j ++ )
1157- sb . AppendFormat ( format2 , confusionTable [ i ] [ j ] ) ;
1157+ sb . AppendFormat ( CultureInfo . InvariantCulture , format2 , confusionTable [ i ] [ j ] ) ;
11581158 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 ) ;
11601160 sb . AppendLine ( ) ;
11611161 }
11621162 sb . AppendFormat ( " {0}||" , pad ) ;
@@ -1168,7 +1168,7 @@ private static string GetConfusionTableAsString(double[][] confusionTable, doubl
11681168 for ( int i = 0 ; i < numLabels ; i ++ )
11691169 {
11701170 Double precision = columnSums [ i ] > 0 ? confusionTable [ i ] [ i ] / columnSums [ i ] : 0 ;
1171- sb . AppendFormat ( format , precision ) ;
1171+ sb . AppendFormat ( CultureInfo . InvariantCulture , format , precision ) ;
11721172 }
11731173 sb . AppendLine ( ) ;
11741174 return sb . ToString ( ) ;
0 commit comments