code: public double[] featureset(double[] features, int label) {
          double[] fs = new double[features.length + 1];
          System.arraycopy(features, 0, fs, 0, features.length);
          fs[features.length] = label;
          return fs;
      }
docs: Returns a feature set with the class label of previous position.
  
  @param features the indices of the nonzero features.
  @param label the class label of previous position as a feature.