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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? algorithmpca.java

?? 完整的模式識別庫
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/** * @(#) AlgorithmPCA.java   v6.0 05/23/2005 * last edited Ryan Irwin  * document created  02/09/03 * * Defines the operation of the PCA Class-Independent Algorithm * */// import java packages//import java.awt.*;import java.util.*;/** * Operation of the PCA Class-Independent Algorithm */public class AlgorithmPCA extends Algorithm{        //-----------------------------------------------------------------    //    // instance data members    //    //-----------------------------------------------------------------        // vector of support region points    //    Matrix trans_matrix_d = new Matrix();    Matrix cov_matrix_d = new Matrix();    Vector<MyPoint> support_vectors_d = new Vector<MyPoint>();    Vector<MyPoint> decision_regions_d = new Vector<MyPoint>();    int output_canvas_d[][];        //-----------------------------------------------------------------    //    // public class methods    //    //------------------------------------------------------------------    /**     * Overrides the initialize() method in the base class.  Initializes     * member data and prepares for execution of first step.  This method     * "resets" the algorithm.     *     * @return true     */    public boolean initialize()    {	// Debug	//	// System.out.println(algo_id + ": initialize()");		trans_matrix_d = new Matrix();	cov_matrix_d = new Matrix();	support_vectors_d = new Vector<MyPoint>();	point_means_d = new Vector<MyPoint>();	decision_regions_d = new Vector<MyPoint>();	step_count = 3;	algo_id = "AlgorithmPCA";		// add the process description for the PCA algorithm	//	if (description_d.size() == 0)        {	    String str = new String("   0. Initialize the original data.");	    description_d.addElement(str);	    	    str = new String("   1. Displaying the original data.");	    description_d.addElement(str);	    	    str = new String("   2. Computing the support regions.");	    description_d.addElement(str);	    	    str = new String("   3. Computing the decision regions based on the class independent principal component analysis algorithm.");	    description_d.addElement(str);	}	    	// append message to process box	//	pro_box_d.appendMessage("Class Independent Principal" 				+ " Component Analysis:" + "\n");	// set the data points for this algorithm	//	//	set1_d = (Vector)data_points_d.dset1.clone();	//	set2_d = (Vector)data_points_d.dset2.clone();	//	set3_d = (Vector)data_points_d.dset3.clone();	//	set4_d = (Vector)data_points_d.dset4.clone();	//	set1_d = data_points_d.dset1;	set2_d = data_points_d.dset2;	set3_d = data_points_d.dset3;	set4_d = data_points_d.dset4;		// set the step index	//	step_index_d = 0;		// append message to process box	//	pro_box_d.appendMessage((String)description_d.get(step_index_d));		// exit gracefully	//	return true;    }        /**     * Implementation of the run function from the Runnable interface.     * Determines what the current step is and calls the appropriate method.     */    public void run()    {	// Debug	//	// System.out.println(algo_id + ": run()");		if (step_index_d == 1)	{	    disableControl();	    step1();	    enableControl();	}	            else if (step_index_d == 2)	{	    disableControl();	    step2(); 	    enableControl();	}		else if (step_index_d == 3)        {	    disableControl();	    step3();	    pro_box_d.appendMessage("   Algorithm Complete");	    enableControl(); 	}		// exit gracefully	//	return;    }        /**     *     * step one of the algorithm. Scales the display to fit the plot.     *     * @return true     */    boolean step1()    {	// Debug	//	// System.out.println(algo_id + ": step1()");		pro_box_d.setProgressMin(0);	pro_box_d.setProgressMax(1);	pro_box_d.setProgressCurr(0);		scaleToFitData();		// Display original data	//	output_panel_d.addOutput(set1_d, Classify.PTYPE_INPUT, 				 data_points_d.color_dset1);	output_panel_d.addOutput(set2_d, Classify.PTYPE_INPUT,				 data_points_d.color_dset2);	output_panel_d.addOutput(set3_d, Classify.PTYPE_INPUT,				 data_points_d.color_dset3);	output_panel_d.addOutput(set4_d, Classify.PTYPE_INPUT, 				 data_points_d.color_dset4);		// step 1 completed	//	pro_box_d.setProgressCurr(1);	output_panel_d.repaint();		// exit gracefully	//	return true;    }    /**     *     * step two of the algorithm. Finds the PCA for the given data     *     * @return true     */    boolean step2()    {	// Debug	//System.out.println(algo_id + ": step2()");			pro_box_d.setProgressMin(0);	pro_box_d.setProgressMax(20);	pro_box_d.setProgressCurr(0);		// append message to process box	//	transformPCA();	printMatrices();	computeMeans();		// display means	//	output_panel_d.addOutput(point_means_d, Classify.PTYPE_OUTPUT_LARGE, 				 Color.black);		// display support vectors	//	output_panel_d.addOutput(support_vectors_d, Classify.PTYPE_INPUT, 				 Color.cyan);		// display support vectors	//	pro_box_d.setProgressCurr(20);	output_panel_d.repaint();		// exit gracefully	//	return true;    }    /**     *     * step three of the algorithm. Computes the decision regions     *     * @return true     */    boolean step3()    {	// Debug	//	// System.out.println(algo_id + ": step3()");		pro_box_d.setProgressMin(0);	pro_box_d.setProgressMax(20);	pro_box_d.setProgressCurr(0);		// compute the decision regisions	//	computeDecisionRegions();	    	// compute errors	//	computeErrors();		// display support vectors	//	// display support vectors	//	output_panel_d.addOutput(decision_regions_d, Classify.PTYPE_INPUT, 				 new Color(255, 200, 0));		output_panel_d.repaint();		// exit gracefully	//	return true;    }        /**     *      * transforms a given set of points to a new space     * using the class independent principal component analysis algorithm     *     */    public void transformPCA()    {	// Debug	// 	// System.out.println(algo_id + ": transformPCA()");	    	// declare local variables	//	int size = 0;	int xsize = 0;	int ysize = 0;	    	// declare variables to compute the global mean	//	double xval = 0.0;	double yval = 0.0;	double xmean = 0.0;	double ymean = 0.0;	    	// declare the covariance object	//	Covariance cov = new Covariance();	    	// declare an eigen object	//	// Since Eigen is a class of static member functions 	// it is not correct to instantiate it - Phil T. 6-23-03 	//Eigen eigen = new Eigen();		// declare the covariance matrix	//	Matrix covariance = new Matrix();	covariance.row = covariance.col = 2;	covariance.Elem = new double[2][2];	    	// declare arrays for the eigenvalues	//	double eigVal[] = null;	    	// declare an array to store the eigen vectors	//	double eigVec[] = new double[2];	    	// declare matrix objects	//	Matrix T = new Matrix();	Matrix M = new Matrix();	Matrix W = new Matrix();	    	// allocate memory for the matrix elements	//	T.Elem = new double[2][2];	M.Elem = new double[2][2];	W.Elem = new double[2][2];	    	// declare arrays to store the samples	//	double x[] = null;	double y[] = null;	    	// declare the maximum size of all data sets together	//	int maxsize = set1_d.size() + set2_d.size() 	            + set3_d.size() + set4_d.size();	    	// initialize arrays to store the samples	//	x = new double[maxsize];	y = new double[maxsize];	    	// get the samples from the first data set	//	size = set1_d.size();	    	// set up the initial random vectors i.e., the vectors of	// X and Y coordinate points form the display	//	for (int i = 0; i < size; i++)        {	    MyPoint p = (MyPoint)set1_d.elementAt(i);	    xval += p.x;	    yval += p.y;	    x[xsize++] = p.x;	    y[ysize++] = p.y;	}		// get the samples from the second data set	//	size = set2_d.size();		// set up the initial random vectors i.e., the vectors of	// X and Y coordinate points form the display	//	for (int i = 0; i < size; i++)        {	    MyPoint p = (MyPoint)set2_d.elementAt(i);	    xval += p.x;	    yval += p.y;	    x[xsize++] = p.x;	    y[ysize++] = p.y;	}		// get the samples from the third data set	//	size = set3_d.size();		// set up the initial random vectors i.e., the vectors of	// X and Y coordinate points form the display	//	for (int i = 0; i < size; i++)        {	    MyPoint p = (MyPoint)set3_d.elementAt(i);	    xval += p.x;	    yval += p.y;	    x[xsize++] = p.x;	    y[ysize++] = p.y;	}		// get the samples from the first data set	//	size = set4_d.size();		// set up the initial random vectors i.e., the vectors of	// X and Y coordinate points form the display	//	for (int i = 0; i < size; i++)        {	    MyPoint p = (MyPoint)set4_d.elementAt(i);	    xval += p.x;	    yval += p.y;	    x[xsize++] = p.x;	    y[ysize++] = p.y;	}		if (maxsize > 0)	{	    	    // initialize the transformation matrix dimensions	    //	    W.row = 2;	    W.col = 2;	    	    // reset the matrices	    //	    W.resetMatrix();	    	    // compute the covariance matrix of the first data set	    //	    covariance.Elem = cov.computeCovariance(x, y);	    cov_matrix_d = covariance;	    	    // initialize the matrix needed to compute the eigenvalues	    //	    T.initMatrix(covariance.Elem, 2, 2);	    	    // make a copy of the original matrix	    //	    M.copyMatrix(T);	    	    // compute the eigen values	    //	    // Changed eigen to Eigen since member function is static -	    // Phil T. 6-23-03	    eigVal = Eigen.compEigenVal(T);	    	    // compute the eigen vectors	    //	    for (int i = 0; i < 2; i++)	    {		// Changed eigen to Eigen since member function is static - 		// Phil T. 6-23-03		Eigen.calcEigVec(M, eigVal[i], eigVec);		for (int j = 0; j < 2; j++)		{		    W.Elem[j][i] = eigVec[j] / Math.sqrt(eigVal[i]);		}	    }	    	    // save the transformation matrix 	    //	    trans_matrix_d = W;	}		// compute the global mean of the data sets	//	xmean = xval / xsize;	ymean = yval / ysize;		// determine points for the support regions	//	double val[][] = new double[2][1];		Matrix invT = new Matrix();	Matrix supp = new Matrix();	Matrix temp = new Matrix();		// set up the angle with which to rotate the axis	//	double theta = 0.0;	double alpha = cov_matrix_d.Elem[0][0] - cov_matrix_d.Elem[1][1];	double beta = -2 * cov_matrix_d.Elem[0][1];	    	if (eigVal[0] > eigVal[1])

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产乱码精品一区二区三区av| 国产清纯白嫩初高生在线观看91 | 爽爽淫人综合网网站| 国产黄人亚洲片| 91麻豆精品国产自产在线| 亚洲日本在线天堂| 成人久久18免费网站麻豆 | 欧美日韩一级二级| 精品99999| 中文字幕欧美日本乱码一线二线| 久久 天天综合| 日韩免费观看2025年上映的电影| 日本在线观看不卡视频| 亚洲国产精品一区二区久久| 在线影视一区二区三区| 亚洲另类春色国产| 91国偷自产一区二区三区成为亚洲经典| 中文字幕av在线一区二区三区| 国产精品一区免费视频| 在线成人av网站| 免费亚洲电影在线| 91精品国产高清一区二区三区蜜臀| 三级影片在线观看欧美日韩一区二区| 欧美人狂配大交3d怪物一区| 午夜激情久久久| 91精品综合久久久久久| 免费在线观看精品| 久久久久久久综合日本| 不卡av在线网| 亚洲成人av电影| 日韩午夜激情免费电影| 国产在线国偷精品产拍免费yy| 91麻豆精品国产91久久久资源速度 | 日本va欧美va瓶| 精品成人一区二区三区| 成人免费观看男女羞羞视频| 亚洲蜜臀av乱码久久精品蜜桃| 在线观看亚洲a| 久久精品国产免费| 久久噜噜亚洲综合| 色综合色综合色综合| 青青青伊人色综合久久| 国产亚洲综合在线| 91浏览器在线视频| 亚洲男人天堂av| 亚洲啪啪综合av一区二区三区| 91视频免费观看| 三级久久三级久久久| 国产欧美一区二区精品久导航| 色综合天天狠狠| 紧缚捆绑精品一区二区| 成人欧美一区二区三区| 3d动漫精品啪啪| av亚洲精华国产精华精华| 亚洲一区二区四区蜜桃| 久久久亚洲综合| 欧美日韩在线三区| 岛国精品一区二区| 天堂一区二区在线| 国产精品久久久久影院老司| 欧美自拍丝袜亚洲| 丰满放荡岳乱妇91ww| 秋霞午夜鲁丝一区二区老狼| 国产精品久久三区| 亚洲精品一区二区三区精华液| 粉嫩aⅴ一区二区三区四区五区| 亚洲五月六月丁香激情| 国产日韩v精品一区二区| 欧美日韩在线播放三区| 国产精品亚洲人在线观看| 午夜激情综合网| 亚洲视频综合在线| 中文av一区二区| 欧美一区二区三区免费在线看| 国产精品1区二区.| 免费看欧美女人艹b| 亚洲精品国产视频| 国产精品久久看| 久久日一线二线三线suv| 91精品国产色综合久久久蜜香臀| 91麻豆swag| 99精品欧美一区二区三区综合在线| 久久er99热精品一区二区| 五月天久久比比资源色| 一区二区三区中文字幕电影| 国产精品萝li| 国产精品色噜噜| 久久综合精品国产一区二区三区| 欧美视频日韩视频| 在线看日本不卡| 在线免费观看视频一区| 一本一道综合狠狠老| 99久久久无码国产精品| av一区二区三区在线| 成人性视频免费网站| 国产精品亚洲а∨天堂免在线| 91精品国产综合久久精品图片| 欧美视频自拍偷拍| 日韩一区二区中文字幕| 国产日韩欧美a| 综合在线观看色| 性做久久久久久免费观看欧美| 麻豆视频一区二区| 成人国产一区二区三区精品| 91福利社在线观看| 欧美xingq一区二区| 欧美国产一区视频在线观看| 亚洲精品成人a在线观看| 日韩vs国产vs欧美| 成人深夜视频在线观看| 欧美日韩精品专区| 国产午夜精品一区二区| 亚洲一区二区五区| 国内不卡的二区三区中文字幕 | 亚洲欧美偷拍三级| 午夜精品一区二区三区电影天堂| 国内一区二区在线| 91精品1区2区| 久久亚洲欧美国产精品乐播| 亚洲精品视频观看| 韩日av一区二区| 欧洲视频一区二区| 久久精品一区二区| 午夜久久久久久久久久一区二区| 韩日精品视频一区| 欧美日韩国产首页| 国产精品久久久久久久久快鸭| 天天综合色天天| zzijzzij亚洲日本少妇熟睡| 日韩区在线观看| 一区二区在线观看免费| 国产91综合一区在线观看| 欧美日韩成人一区| 亚洲免费看黄网站| 国产成人精品www牛牛影视| 欧美日韩一区二区三区高清| 国产精品免费观看视频| 久久电影网站中文字幕| 欧美写真视频网站| 国产精品久久久久影院老司| 精品在线你懂的| 欧美绝品在线观看成人午夜影视| 中文一区二区完整视频在线观看| 日韩黄色一级片| 色噜噜夜夜夜综合网| 国产精品午夜电影| 国产综合色在线| 欧美va亚洲va香蕉在线| 日本亚洲视频在线| 欧美性色aⅴ视频一区日韩精品| 国产精品成人午夜| 高清不卡在线观看av| 久久网站热最新地址| 久久国产三级精品| 制服丝袜国产精品| 五月婷婷久久丁香| 91黄视频在线| 一区二区三区欧美激情| 97久久超碰国产精品| 国产精品卡一卡二| www.日韩av| 亚洲三级在线观看| 99精品久久久久久| 亚洲国产精品ⅴa在线观看| 国产乱人伦精品一区二区在线观看| 日韩天堂在线观看| 久久福利视频一区二区| 欧美tickling挠脚心丨vk| 久久国产精品99久久人人澡| 精品少妇一区二区三区| 久久99热国产| 久久色在线视频| 成人性生交大合| 国产精品妹子av| 97精品超碰一区二区三区| 亚洲三级在线观看| 欧美亚洲一区三区| 无码av中文一区二区三区桃花岛| 欧美日韩一区二区三区视频| 视频一区二区中文字幕| 日韩欧美三级在线| 国产成人小视频| 日韩一区在线播放| 欧美主播一区二区三区| 日韩成人伦理电影在线观看| 精品国产乱码久久久久久1区2区 | 日韩精品1区2区3区| 91精品国产手机| 国产河南妇女毛片精品久久久 | 欧美成人一级视频| 国产福利一区二区| 亚洲欧洲色图综合| 欧美精品一二三| 国产自产v一区二区三区c| 亚洲国产精品ⅴa在线观看| 色婷婷国产精品| 青青草原综合久久大伊人精品优势| 精品成人一区二区三区| 91浏览器入口在线观看| 丝袜美腿亚洲综合|