protected override ITimeSeriesPrognosisProblemData ImportData(string path, TimeSeriesPrognosisImportType type, TableFileParser csvFileParser) {
      Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);

      // turn of input variables that are constant in the training partition
      var allowedInputVars = new List<string>();
      int trainingPartEnd = (csvFileParser.Rows * type.TrainingPercentage) / 100;
      trainingPartEnd = trainingPartEnd > 0 ? trainingPartEnd : 1;
      var trainingIndizes = Enumerable.Range(0, trainingPartEnd);
      if (trainingIndizes.Count() >= 2) {
        foreach (var variableName in dataset.DoubleVariables) {
          if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
            variableName != type.TargetVariable)
            allowedInputVars.Add(variableName);
        }
      } else {
        allowedInputVars.AddRange(dataset.DoubleVariables.Where(x => !x.Equals(type.TargetVariable)));
      }

      TimeSeriesPrognosisProblemData timeSeriesPrognosisData = new TimeSeriesPrognosisProblemData(dataset, allowedInputVars, type.TargetVariable);

      timeSeriesPrognosisData.TrainingPartition.Start = 0;
      timeSeriesPrognosisData.TrainingPartition.End = trainingPartEnd;
      timeSeriesPrognosisData.TestPartition.Start = trainingPartEnd;
      timeSeriesPrognosisData.TestPartition.End = csvFileParser.Rows;

      timeSeriesPrognosisData.Name = Path.GetFileName(path);

      return timeSeriesPrognosisData;
    }
        protected override ITimeSeriesPrognosisProblemData ImportData(string path, TimeSeriesPrognosisImportType type, TableFileParser csvFileParser)
        {
            Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);

            // turn of input variables that are constant in the training partition
            var allowedInputVars = new List <string>();
            int trainingPartEnd  = (csvFileParser.Rows * type.TrainingPercentage) / 100;

            trainingPartEnd = trainingPartEnd > 0 ? trainingPartEnd : 1;
            var trainingIndizes = Enumerable.Range(0, trainingPartEnd);

            if (trainingIndizes.Count() >= 2)
            {
                foreach (var variableName in dataset.DoubleVariables)
                {
                    if (dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&
                        variableName != type.TargetVariable)
                    {
                        allowedInputVars.Add(variableName);
                    }
                }
            }
            else
            {
                allowedInputVars.AddRange(dataset.DoubleVariables.Where(x => !x.Equals(type.TargetVariable)));
            }

            TimeSeriesPrognosisProblemData timeSeriesPrognosisData = new TimeSeriesPrognosisProblemData(dataset, allowedInputVars, type.TargetVariable);

            timeSeriesPrognosisData.TrainingPartition.Start = 0;
            timeSeriesPrognosisData.TrainingPartition.End   = trainingPartEnd;
            timeSeriesPrognosisData.TestPartition.Start     = trainingPartEnd;
            timeSeriesPrognosisData.TestPartition.End       = csvFileParser.Rows;

            timeSeriesPrognosisData.Name = Path.GetFileName(path);

            return(timeSeriesPrognosisData);
        }