public LogisticRegression(PdfFeatureAwareLogisticRegression pdf, double[] instanceWeights, 
							double[][] featureValues, int[] labels, 
							String type, //Bijection featureMapping, Bijection labelMapping, 
							double[] regularizationWeights, double[] regularizationBiases, 
							double LBFGS_TOLERANCE, int LBFGS_MAX_ITERS ) {
		
		
		if (featureValues.length != labels.length) {
			System.out.println("featureValues.length != outcomes.length!");
			System.exit(1);
		}
		if (featureValues[0].length != pdf.getFeatureWeights().length) {
			System.out
					.println("featureValues[0].length != opdf.featureWeights.length");
			System.exit(1);
		}
		if (instanceWeights == null || instanceWeights.length != labels.length) {
			System.out.println("ERROR: instance/class weights are null || weights.length != outcomes.length");
			System.exit(1);
		}
		
		this.pdf = new PdfFeatureAwareLogisticRegression(pdf);
		
		this.initalFeatureWeights = new double[pdf.getFeatureWeights().length];
		for (int f = 0; f < initalFeatureWeights.length; f++) 
			initalFeatureWeights[f] = pdf.getFeatureWeights()[f];
		
		this.instanceWeights = new double[instanceWeights.length];
		for (int i = 0; i < instanceWeights.length; i++) 
			this.instanceWeights[i] = instanceWeights[i];
		
		this.featureValues = new double[featureValues.length][featureValues[0].length];
		for (int i = 0; i < featureValues.length; i++)
			for (int j = 0; j < featureValues[0].length; j++)
				this.featureValues[i][j] = featureValues[i][j];
		
		this.labels = new int[labels.length];
		for (int i = 0; i < labels.length; i++) 
			this.labels[i] = labels[i];

		//this.featureMapping = new Bijection(featureMapping);
		//this.labelMapping = new Bijection(labelMapping);
		this.type = type;
		this.regularizationWeights = regularizationWeights;
		this.regularizationBiases = regularizationBiases;
		this.LBFGS_TOLERANCE = LBFGS_TOLERANCE;
		this.LBFGS_MAX_ITERS = LBFGS_MAX_ITERS;
	}