public static void run(int baseNum,File[] trainFile,double[] basePctg,boolean targeted,File testFile,File accOutFile,int num,boolean continued) throws Exception
	{
		System.out.println(accOutFile.getAbsolutePath());
		Map<Integer,Integer> wordLength=CreateAttack.getWordLength(new File(ConstantClass.FeatureFile));
		Map<Integer,String> wordString= getWordString(new File(ConstantClass.FeatureFile));
		//read in all the training vectors
		BufferedWriter accOut=new BufferedWriter(new FileWriter(accOutFile,true));
		List<List<LabeledFeatureVector>> l=new Vector<List<LabeledFeatureVector>>();
		//read vectors in from each train file
		int total=0;
		//read vectors in from each train file
		for(int i=0;i<trainFile.length;i++)
			{
			List<LabeledFeatureVector> tempL=Tool.readFeaVec(trainFile[i]);
			l.add(tempL);
			total+=tempL.size();
			}
		//read vectors from the test file
		List<LabeledFeatureVector> t=Tool.readFeaVec(testFile);
		LabeledFeatureVector[] te=t.toArray(new LabeledFeatureVector[t.size()]);
		//train and test
		for(int i=0;i<num;i++)
		{
			System.out.println(i+"th run");
			//generate baseNum of tweets
			List<List<LabeledFeatureVector>> baseNumTwt=new Vector<List<LabeledFeatureVector>>();
			List<LabeledFeatureVector> train=new Vector<LabeledFeatureVector>();
			//add a max feature into the last sample
			LabeledFeatureVector tempL=new LabeledFeatureVector(1.0,new int[] {ConstantClass.MaxNumFea},new double[] {1.0});
			train.add(tempL);
			//get the base training data
			for(int j=0;j<trainFile.length;j++)
			{
				baseNumTwt.add(Tool.getRandVec(l.get(j), (int)(baseNum*basePctg[j]),false));
				train.addAll(baseNumTwt.get(j));
			}
			
			double acc=1.0;
			String ct="";
			for(;acc>0.5&&train.size()-start_point*ConstantClass.DataSetSize<31000;)
			{
				NBAttack attack=null;
				LabeledFeatureVector[] tr=train.toArray(new LabeledFeatureVector[train.size()]);
				MyNaiveBayesMultinomial nb=TrainTestOut.trainBayes(tr);
				acc=TrainTestOut.testBayes(nb, te);
				Map<Integer,Map<Integer,Double>> density=getDensityMap(nb.toString(),wordString);
				Map<Integer,Double> classProb=getClassProbMap(nb.getClassProb());
				attack=new NBAttack(wordLength, density,classProb);
				ct=attack.attackLabel()+"\t"+attack.attackTweet(wordString);		//created tweet
				System.out.println(ct);
				Set<Integer> point=attack.attackPoint();
				LabeledFeatureVector attackVec=point2Vec(attack.attackLabel(), point);
				//for(Integer x:point) {c
				//	System.out.println(density.get(-1).get(x)+" " +density.get(1).get(x)+" "+wordLength.get(x));
				//	}
				accOut.write(acc+"\t");
				accOut.flush();
				System.out.println("Trained on "+(train.size()-1)+" tweets ( "+(double)train.size()/(double)total+" of all the data ) with acc: "+acc);
				//add data ten times to the training set
				for(int j=0;j<10;j++)
					{
						train.add(attackVec);
					}
				System.gc();
			}
			accOut.write("\n");
			accOut.flush();
	}
		accOut.close();
}