code: public ConcatVector newWeightsVector(boolean presize) {
          ConcatVector vector = new ConcatVector(featureToIndex.size());
          if (presize) {
              for (ObjectCursor<String> s : sparseFeatureIndex.keys()) {
                  int size = sparseFeatureIndex.get(s.value).size();
                  vector.setDenseComponent(ensureFeature(s.value), new double[size]);
              }
          }
          setAlwaysOneFeature(vector, 1);
          return vector;
      }
docs: This constructs a fresh vector that is sized correctly to accommodate all the known sparse values for vectors
  that are possibly sparse.
  
  @param presize a flag for whether or not to create all the dense double arrays for our sparse features
  
  @return a new, internally correctly sized ConcatVector that will work correctly as weights for features from
  this namespace;