title: ML.NET: Schema mismatch for input column 'AnswerFeaturized_CharExtractor': expected Expected Single or known-size vector of Single, got Vector<Single>
body: <p>I was trying to create a machine learning model in ML.NET that predicts a grade based on user input answer.
  Following is the code:  </p>
  
  <pre><code>    private static string _appPath =&gt; Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]);
          private static string _trainDataPath =&gt; Path.Combine(_appPath, "..", "..", "..", "Data", "GradeTrain.csv");
  
          static void Main(string[] args)
          {
              _mlContext = new MLContext(seed: 0);
              _trainingDataView = _mlContext.Data.LoadFromTextFile&lt;InputData&gt;(_trainDataPath, hasHeader: true);           
              var pipeline = ProcessData();
              var trainingPipeline = BuildAndTrainModel(_trainingDataView, pipeline);            
              Evaluate(_trainingDataView.Schema);          
          }
  
          public static IEstimator&lt;ITransformer&gt; ProcessData()
          {
              var pipeline = _mlContext.Transforms.Conversion.MapValueToKey(inputColumnName: "Grade", outputColumnName: "Label").Append(_mlContext.Transforms.Text.FeaturizeText(inputColumnName: "QuestionID", outputColumnName: "QuestionIDFeaturized")).Append(_mlContext.Transforms.Text.FeaturizeText(inputColumnName: "Answer", outputColumnName: "AnswerFeaturized")).Append(_mlContext.Transforms.Concatenate("Features", "QuestionIDFeaturized", "AnswerFeaturized")).AppendCacheCheckpoint(_mlContext);
              return pipeline;
          }
        public static IEstimator&lt;ITransformer&gt; BuildAndTrainModel(IDataView trainingDataView, IEstimator&lt;ITransformer&gt; pipeline)
          {
              var trainingPipeline = pipeline.Append(_mlContext.MulticlassClassification.Trainers.SdcaMaximumEntropy("Label", "Features"))                .Append(_mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabel"));            
              _trainedModel = trainingPipeline.Fit(trainingDataView);
              _predEngine = _mlContext.Model.CreatePredictionEngine&lt;InputData, answerGradePrediction&gt;(_trainedModel);
              InputData issue = new InputData()
              {
                  QuestionID = "HOUSES",
                  Answer = "The upper house is called Rajya sabha and the lower house is called Lok sabha"
              };
              var prediction = _predEngine.Predict(issue);           
              return trainingPipeline;
          }
  </code></pre>
  
  <p>Code for Input class</p>
  
  <pre><code>public class InputData
  {
      [LoadColumn(0)]
      public string QuestionID { get; set; }
      [LoadColumn(1)]
      public string Answer { get; set; }
      [LoadColumn(2)]
      public string Grade { get; set; }
  }
  </code></pre>
  
  <p>This gives the following error on the Fit Function:</p>
  
  <pre><code>System.ArgumentOutOfRangeException: 'Schema mismatch for input column 'AnswerFeaturized_CharExtractor': expected Expected Single or known-size vector of Single, got Vector&lt;Single&gt;
  Parameter name: inputSchema'
  </code></pre>
  
  <p>Any ideas?</p>