public int Compare(FeatureSubsetModel <IPredictorProducing <TOutput> > x, FeatureSubsetModel <IPredictorProducing <TOutput> > y)
            {
                if (x == null || y == null)
                {
                    return((x == null ? 0 : 1) - (y == null ? 0 : 1));
                }
                double xValue = 0;
                var    found  = false;

                foreach (var kvp in x.Metrics)
                {
                    if (_metricName == kvp.Key)
                    {
                        xValue = kvp.Value;
                        found  = true;
                        break;
                    }
                }
                if (!found)
                {
                    throw Contracts.Except("Metrics did not contain the requested metric '{0}'", _metricName);
                }
                double yValue = 0;

                found = false;
                foreach (var kvp in y.Metrics)
                {
                    if (_metricName == kvp.Key)
                    {
                        yValue = kvp.Value;
                        found  = true;
                        break;
                    }
                }
                if (!found)
                {
                    throw Contracts.Except("Metrics did not contain the requested metric '{0}'", _metricName);
                }
                if (xValue > yValue)
                {
                    return(_isAscMetric ? -1 : 1);
                }
                if (yValue > xValue)
                {
                    return(_isAscMetric ? 1 : -1);
                }
                return(0);
            }
 public override void CalculateMetrics(FeatureSubsetModel<IPredictorProducing<TOutput>> model,
     ISubsetSelector subsetSelector, Subset subset, Batch batch, bool needMetrics)
 {
     base.CalculateMetrics(model, subsetSelector, subset, batch, true);
 }