亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? controller.java

?? Boosting算法軟件包
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
	long start, stop;    	Executor pe=ExecutorSinglet.getExecutor();	for (int iter= 0; iter < iterNo	&& !m_learningTree.boosterIsFinished(); iter++) {	    if (Monitor.logLevel > 1) {		m_monitor.logIteration(				       iter,				       m_learningTree.getCombinedPredictor(),				       m_learningTree.getLastBasePredictor());	    }	    start= System.currentTimeMillis();	    Vector candidates= m_learningTree.getCandidates();	    stop= System.currentTimeMillis();	    if (Monitor.logLevel > 3) {		Monitor.log("Learning iteration " + iter + " candidates are:");		Monitor.log(candidates.toString());		Monitor.log("It took " + (stop - start) / 1000.0 + " seconds to generate candidates Vector for iteration "			    + iter);	    }	    // This piece should be replaced by a more general tool to	    // measure the goodness of a split.      	    // Create a synchronization barrier that counts the number	    // of processed splitter builders	    CountDown candidateCount=new CountDown(candidates.size());	    // an array to record losses in	    double[] losses=new double[candidates.size()];      	    int i=0;	    for(Iterator ci=candidates.iterator();ci.hasNext();) {		CandidateSplit candidate=(CandidateSplit)ci.next();		SplitEvaluatorWorker sew=new SplitEvaluatorWorker(candidate,losses,i,candidateCount);		try {		    pe.execute(sew);		}  catch (InterruptedException ie) {		    System.err.println("exception ocurred while handing off the candidate job to the pool: "+ie.getMessage());		    ie.printStackTrace();		}		i++;	    }      	    try {		candidateCount.acquire();	    } catch(InterruptedException ie) {		if(candidateCount.currentCount()!=0) {		    System.err.println("interrupted exception occurred, but the candidateCount is "+candidateCount.currentCount());		}	    };      	    // run through the losses results to determine the best split	    int best=0;	    if (losses.length==0) {		System.err.println("ERROR: There are no candidate weak hypotheses to add to the tree.");		System.err.println("This is likely a bug in JBoost; please report to JBoost developers.");		System.exit(2);	    }	    double bestLoss=losses[best];	    double tmpLoss;	    for(int li=1;li<losses.length;li++) {		if((tmpLoss=losses[li]) < bestLoss) {		    bestLoss=tmpLoss;		    best=li;		}	    }	    if (Monitor.logLevel > 3)		Monitor.log("Best candidate is: " + (CandidateSplit) candidates.get(best) + "\n");	    // add the candidate with lowest loss	    start= System.currentTimeMillis();	    m_learningTree.addCandidate((CandidateSplit) candidates.get(best));	    stop= System.currentTimeMillis();	    if (Monitor.logLevel > 3) {		Monitor.log(			    "It took "			    + (stop - start) / 1000.0			    + " seconds to add candidate for iteration "			    + iter);	    }	    System.out.println("Finished learning iteration " + iter);	    if(m_booster instanceof BrownBoost){		iterNo++;	    }	}	System.out.println();	if (Monitor.logLevel > 3)	    m_monitor.logIteration(				   iterNo,				   m_learningTree.getCombinedPredictor(),				   m_learningTree.getLastBasePredictor());    }      /**     * @param cp a predictor     * @throws IncompAttException     */    private void test(Predictor cp)	throws NotSupportedException, InstrumentException {	int size= m_config.getTestSet().getExampleNo();	int i= 0;	Example ex= null;	Monitor.log("Testing rule.");	LabelDescription labelDescription= m_exampleDescription.getLabelDescription();	try {	    for (i= 0; i < size; i++) {		ex= m_config.getTestSet().getExample(i);		Prediction prediction= cp.predict(ex.getInstance());		Label label= ex.getLabel();		if (!prediction.getBestClass().equals(label)) {		    Monitor.log("Test Example " + i + "   -----------------------------");		    Monitor.log(ex);		    Monitor.log("------------------------------------------");		    Monitor.log(prediction);		    Monitor.log(				"Explanation: " + ((AlternatingTree) cp).explain(ex.getInstance()));		}	    }	} catch (IncompAttException e) {	    // TODO add something here?	}    }      /**     * build the array of splitterBuilders     * @throws IncompAttException     */    private void buildSplitterBuilderArray() throws IncompAttException {	Vector sbf= SplitterBuilderFamily.factory(m_config);	m_splitterBuilderVector= new Vector();    	for (int i= 0; i < sbf.size(); i++) {	    m_splitterBuilderVector.addAll(((SplitterBuilderFamily) sbf.get(i)).build(										      m_exampleDescription,										      m_config,										      m_booster));	}    	if (Monitor.logLevel > 3) {	    Monitor.log("The initial array of splitter Builders is:");	    for (int i= 0; i < m_splitterBuilderVector.size(); i++) {		Monitor.log("builder " + i + m_splitterBuilderVector.get(i));	    }	}    }    /**     * Determine the private weight for this example     * If the margin weight of the example is less than the threshold,     * then we accept the example with probability margin/threshold and     * set the private weight to 1/margin     * Otherwise we accept the example and set the private weight to 1/threshold      * @param data     * @param threshold     * @return     */    private double calculateExampleWeight(Example data, double threshold) {	double weight= -1; 	Label label= data.getLabel();	Instance instance= data.getInstance();	double[] weights= m_serializedTree.predict(instance).getMargins(label);	double margin=0;	//  for now, just handle the binary prediction case	if (weights.length == 1) {	    margin= m_booster.calculateWeight(weights[0]);        	} // else handle multi-label    	if (margin < threshold) {	    double prob= margin/threshold;	    if (Math.random() <= prob) { 		weight= 1/margin;	    }	} else {	    weight= 1/threshold;	}	return weight;    }       /**     * Add example to booster and training set.      * Update SplitterBuilder vector for this example     * @param counter     * @param example     * @param exampleWeight     */    private void addTrainingExample(int counter, Example example, double exampleWeight) {    	if (Monitor.logLevel > 0) {	    m_config.getTrainSet().addExample(counter, example);	}    	m_booster.addExample(counter, example.getLabel(), exampleWeight);    	for (int i= 0; i < m_splitterBuilderVector.size(); i++) {	    if (Monitor.logLevel > 5) {		Monitor.log("the class of splitterBuilder " + i + " is "			    + m_splitterBuilderVector.get(i).getClass());	    }	    ((SplitterBuilder) m_splitterBuilderVector.get(i)).addExample(counter, example);	}        }        /**     * Read the training file and initialize the booster and the splitterBuilders     * with its content     * @throws BadLabelException     * @throws IncompAttException     * @throws ParseException     */    private void readTrainData()	throws IncompAttException, ParseException {    	long start, stop;	m_config.setTrainSet(new ExampleSet(m_exampleDescription));    	Example example= null;	int counter= 0;	start= System.currentTimeMillis();	boolean sampling= m_config.getBool(ControllerConfiguration.SAMPLE_TRAINING_DATA, false);	double threshold= m_config.getDouble(ControllerConfiguration.SAMPLE_THRESHOLD_WEIGHT, 0.500);	while ((example= m_trainStream.getExample()) != null) {      	    double exampleWeight= example.getWeight();    	    boolean accepted= true;	    // if we are sampling, then calculate the weight of this example	    // if the exampleWeight is zero, then don't accept this example	    if (sampling) {		exampleWeight= calculateExampleWeight(example, threshold);		if (exampleWeight < 0) {		    accepted= false;		}	    }	    // The default behavior is to accept each example. An	    // example is only refused if we are sampling and its	    // weight is set to zero.	    if (accepted) {		addTrainingExample(counter, example, exampleWeight);		counter++;	    }	    if ((counter % 100) == 0) {		System.out.print("Read " + counter + " training examples\n");	    }	}    	stop= System.currentTimeMillis();	System.out.println("Read " + counter + " training examples in " + (stop - start) / 1000.0			   + " seconds.");	m_config.getTrainSet().finalizeData();	m_booster.finalizeData();	for (int i= 0; i < m_splitterBuilderVector.size(); i++) {	    ((SplitterBuilder) m_splitterBuilderVector.get(i)).finalizeData();	}	m_trainSetIndices= new int[counter];	for (int i= 0; i < counter; i++)	    m_trainSetIndices[i]= i;    }      /**     * initialize the tokenizer      * @throws Exception      */    private void startTokenizer() throws Exception {	DataStream ds= null;	ds= new jboost_DataStream(m_config.getSpecFileName(), m_config.getTrainFileName());	m_trainStream= new ExampleStream(ds);	ds= new jboost_DataStream(m_config.getSpecFileName(), m_config.getTestFileName());	m_testStream= new ExampleStream(ds);    }        /** read the test data file */    private void readTestData()	throws BadLabelException, IncompAttException, ParseException {    	long start, stop;	m_config.setTestSet(new ExampleSet(m_exampleDescription));	Example example= null;	int counter= 0;	start= System.currentTimeMillis();	while ((example= m_testStream.getExample()) != null) {	    m_config.getTestSet().addExample(counter, example);	    counter++;	    if ((counter % 100) == 0) {		System.out.print("read " + counter + " test examples\n");	    }	}	stop= System.currentTimeMillis();	System.out.println("read " + counter + " test examples in " + (stop - start) / 1000.0			   + " seconds.");	m_config.getTestSet().finalizeData();    }        private void reportResults() {	try {	    PrintWriter resultOutputStream=		new PrintWriter(new BufferedWriter(new FileWriter(m_config.getResultOutputFileName())));	    resultOutputStream.println(m_learningTree);	    resultOutputStream.close();	} catch (Exception e) {	    System.err.println("Exception occured while attempting to write result");	    e.printStackTrace();	}    }    private void generateCode(			      WritablePredictor predictor,			      String language,			      String codeOutputFileName,			      String procedureName) {	try {	    String code= null;	    if (language.equals("C"))		code= predictor.toC(procedureName, m_exampleDescription);	    else if (language.equals("MatLab"))		code= predictor.toMatlab(procedureName, m_exampleDescription);	    else if (language.equals("java"))		code=		    predictor.toJava(				     procedureName,				     m_config.getString("javaOutputMethod", "predict"),				     (m_config.getBool("javaStandAlone", false) ? null : m_config.getSpecFileName()),				     m_exampleDescription);	    else		throw new RuntimeException(					   "Controller.generateCode: Unrecognized language:" + language);	    PrintWriter codeOutputStream=		new PrintWriter(new BufferedWriter(new FileWriter(codeOutputFileName)));	    codeOutputStream.println(code);	    codeOutputStream.close();	} catch (Exception e) {	    System.err.println(			       "Exception occured while attempting to write " + language + " code");	    System.err.println("Message:" + e);	    e.printStackTrace();	}    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人鲁色资源国产91色综| 欧美在线啊v一区| 毛片一区二区三区| 青青草国产精品97视觉盛宴| 午夜精品一区二区三区三上悠亚| 夜夜嗨av一区二区三区中文字幕| 久久久91精品国产一区二区精品| 精品国产自在久精品国产| 4438x亚洲最大成人网| 欧美区视频在线观看| 欧美精品丝袜中出| 欧美精品第一页| 日韩欧美一区电影| 欧美精品一区男女天堂| 国产女人18水真多18精品一级做| 国产精品女同互慰在线看| 亚洲色图欧美偷拍| 一区二区三区免费在线观看| 香蕉影视欧美成人| 免费精品99久久国产综合精品| 奇米四色…亚洲| 极品少妇一区二区| www.欧美色图| 在线精品视频小说1| 欧美电影一区二区| 久久综合色播五月| 日韩美女视频一区二区| 午夜久久久久久久久| 捆绑紧缚一区二区三区视频| 国产一区二区三区观看| 成人精品免费看| 欧美日韩一区 二区 三区 久久精品| 555www色欧美视频| 国产日产欧美一区| 亚洲自拍另类综合| 精品写真视频在线观看| 福利电影一区二区三区| 欧美天堂亚洲电影院在线播放| 日韩视频一区二区在线观看| 久久精品欧美一区二区三区不卡| 亚洲人123区| 麻豆精品一区二区三区| 99精品偷自拍| 日韩午夜激情av| 中文字幕在线一区免费| 日本亚洲天堂网| av成人动漫在线观看| 91精品国产综合久久福利软件| 国产午夜亚洲精品羞羞网站| 亚洲男帅同性gay1069| 久久激五月天综合精品| 91亚洲大成网污www| 日韩美女一区二区三区四区| 中文字幕日本不卡| 久久精品国产澳门| 欧洲国内综合视频| 国产女主播视频一区二区| 天堂久久一区二区三区| 成人黄色小视频| 日韩精品影音先锋| 亚洲精品va在线观看| 国产精品一区二区果冻传媒| 欧美日韩国产高清一区| 国产精品乱子久久久久| 久久99热国产| 欧美视频日韩视频| 国产精品久久久久天堂| 久久精品国产澳门| 欧美日韩国产色站一区二区三区| 国产精品久久精品日日| 精品综合久久久久久8888| 欧美在线观看禁18| 国产精品嫩草久久久久| 精品一区二区三区欧美| 欧美日韩视频在线观看一区二区三区| 国产日韩欧美激情| 麻豆精品国产91久久久久久| 色噜噜夜夜夜综合网| 中文字幕精品一区| 国内外成人在线| 91麻豆精品国产91久久久| 亚洲综合视频网| 色综合婷婷久久| 国产精品伦理在线| 99精品久久久久久| 99国产精品视频免费观看| 色综合天天综合色综合av| 久久色.com| 久久精品国产色蜜蜜麻豆| 在线91免费看| 一区二区成人在线观看| 成人av电影在线网| 中文字幕欧美日韩一区| 国产美女娇喘av呻吟久久| 91精品国产麻豆国产自产在线 | 久久午夜电影网| 蜜臀av一区二区| 91麻豆精品国产91久久久久久久久 | 久久久午夜精品理论片中文字幕| 免费不卡在线视频| 91精品国产综合久久久久| 亚洲r级在线视频| 欧美麻豆精品久久久久久| 亚洲午夜电影在线| 欧美午夜精品久久久久久超碰| 1区2区3区精品视频| 成人精品视频一区| 成人免费在线观看入口| 91色.com| 亚洲18影院在线观看| 91超碰这里只有精品国产| 丝袜脚交一区二区| 日韩精品一区二区三区在线| 精品一区二区三区免费视频| 亚洲精品在线电影| 成人午夜视频网站| 亚洲欧美日韩一区二区| 日本韩国精品在线| 午夜精品久久久久久| 日韩一区二区三区四区五区六区 | 精品视频在线看| 丝袜脚交一区二区| 精品国产乱码久久久久久久| 狠狠色丁香婷婷综合久久片| 国产三区在线成人av| 波多野结衣在线aⅴ中文字幕不卡| 中文字幕制服丝袜成人av | 日韩欧美激情一区| 国产黄色精品视频| 亚洲欧美日韩一区| 欧美一区二区三区性视频| 韩国成人在线视频| 国产精品久久久久aaaa| 欧美国产激情二区三区 | 日韩欧美精品三级| 国产成人精品在线看| 亚洲理论在线观看| 日韩一区二区免费电影| 风流少妇一区二区| 亚洲午夜国产一区99re久久| 欧美成人一区二区三区在线观看| 国产.精品.日韩.另类.中文.在线.播放 | 国产精品久久久久影院老司| 在线视频欧美区| 精品一区二区三区在线播放视频 | 日本欧美一区二区| 欧美国产激情二区三区| 欧美日韩一级片网站| 韩国av一区二区三区四区| 亚洲人成网站在线| 欧美不卡一二三| 91色porny在线视频| 麻豆精品久久久| 亚洲欧美另类小说| 亚洲精品一区二区在线观看| 91蝌蚪porny成人天涯| 日本aⅴ精品一区二区三区| 国产精品九色蝌蚪自拍| 日韩三级电影网址| 欧美中文字幕一区| 国产精品一区三区| 日韩成人免费电影| 中文字幕在线不卡一区二区三区| 91精品国产麻豆国产自产在线| 波多野结衣中文字幕一区二区三区| 日韩在线观看一区二区| 18成人在线观看| 久久久精品中文字幕麻豆发布| 欧美久久久久中文字幕| 国产欧美一区二区精品性| 欧美在线你懂的| 成人av资源下载| 国内精品久久久久影院薰衣草| 午夜电影网亚洲视频| 综合在线观看色| 国产欧美日韩综合精品一区二区| 欧美美女直播网站| 色综合天天天天做夜夜夜夜做| 国产一区欧美一区| 日本亚洲免费观看| 亚洲综合在线免费观看| 国产精品久久久一区麻豆最新章节| 日韩欧美在线不卡| 欧美福利一区二区| 91福利区一区二区三区| 成人av免费在线播放| 国产精品77777竹菊影视小说| 日本不卡视频在线| 日韩专区在线视频| 亚洲国产一二三| 亚洲激情在线激情| 日韩伦理免费电影| 成人欧美一区二区三区在线播放| 国产亚洲人成网站| 国产性天天综合网| 337p粉嫩大胆噜噜噜噜噜91av| 日韩午夜中文字幕| 日韩欧美激情一区| 欧美一级日韩一级| 欧美大片免费久久精品三p|