code: public double[][] adaptWeights(double[][] origWeights, GeneralDataset<L, F> adaptDataset) {
      System.err.println("adaptWeights in LinearClassifierFactory. increase weight dim only");
      double[][] newWeights = new double[adaptDataset.featureIndex.size()][adaptDataset.labelIndex.size()];
  
      System.arraycopy(origWeights,0,newWeights,0,origWeights.length);
  
      AdaptedGaussianPriorObjectiveFunction<L, F> objective = new AdaptedGaussianPriorObjectiveFunction<L, F>(adaptDataset, logPrior,newWeights);
  
      double[] initial = objective.initial();
  
      double[] weights = minimizer.minimize(objective, TOL, initial);
      return objective.to2D(weights);
  
      //Question: maybe the adaptWeights can be done just in LinearClassifier ?? (pichuan)
    }
docs: Adapt classifier (adjust the mean of Gaussian prior)
  under construction -pichuan
  @param origWeights the original weights trained from the training data
  @param adaptDataset the Dataset used to adapt the trained weights
  @return adapted weights