Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I use PCACompute and PCAProject in java?

I am trying to reduce vector size usig PCA in java. I am dealing with 40 objects(col), and each object has 644 feature vector(row). I want to reduce feature vector size 50% which means resultant feature vector would be (322) I use following code segment,there is a mistake.And I can not see the fail! How can I reduce using PCACommpute and PCAProject? Thanks in advance.

code: float[] a= new float[]{(....}; Mat srcMat = new Mat(644,40,CvType.CV_32FC1); srcMat.put(0,0,a); Mat Avg = new Mat(1,644,CvType.CV_32FC1); Mat EginenValue = new Mat(644,1,CvType.CV_32FC1); Mat EigenVector = new Mat(644,644,CvType.CV_32FC1); PCACompute(srcMat,Avg,EigenVector,322)

How can I use PCACompute and PCAProject in java?

I am trying to reduce vector size usig PCA in java. I am dealing with 40 objects(col), and each object has 644 feature vector(row). I want to reduce feature vector size 50% which means resultant feature vector would be (322) I use following code segment,there is a mistake.And I can not see the fail! How can I reduce using PCACommpute and PCAProject? Thanks in advance.

code: code:

float[] a= new float[]{(....}; float[]{(....};

Mat srcMat = new Mat(644,40,CvType.CV_32FC1); srcMat.put(0,0,a); Mat(644,40,CvType.CV_32FC1);

srcMat.put(0,0,a);

Mat Avg = new Mat(1,644,CvType.CV_32FC1); Mat(1,644,CvType.CV_32FC1);

Mat EginenValue = new Mat(644,1,CvType.CV_32FC1); Mat(644,1,CvType.CV_32FC1);

Mat EigenVector = new Mat(644,644,CvType.CV_32FC1); Mat(644,644,CvType.CV_32FC1);

PCACompute(srcMat,Avg,EigenVector,322)

How can I use PCACompute and PCAProject in java?

I am trying to reduce vector size usig PCA in java. I am dealing with 40 objects(col), and each object has 644 feature vector(row). I want to reduce feature vector size 50% which means resultant feature vector would be (322) I use following code segment,there is a mistake.And I can not see the fail! How can I reduce using PCACommpute and PCAProject? Thanks in advance.

code:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

float[] a= new float[]{(....};

Mat srcMat = new Mat(644,40,CvType.CV_32FC1);

srcMat.put(0,0,a);

Mat Avg = new Mat(1,644,CvType.CV_32FC1);

Mat EginenValue = new Mat(644,1,CvType.CV_32FC1);

Mat EigenVector = new Mat(644,644,CvType.CV_32FC1);

PCACompute(srcMat,Avg,EigenVector,322)core.PCACompute(srcMat,Avg,EigenVector,322)

How can I use PCACompute and PCAProject in java?

I am trying to reduce vector size usig PCA in java. I am dealing with 40 objects(col), and each object has 644 feature vector(row). I want to reduce feature vector size 50% which means resultant feature vector would be (322) (322). I use following code segment,there is a mistake.And I can segment,but could not see get the fail! right answer. How can I reduce using PCACommpute and PCAProject? Thanks in advance.

code:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

float[] a= new float[]{(....};

Mat srcMat = new Mat(644,40,CvType.CV_32FC1);

srcMat.put(0,0,a);

Mat Avg = new Mat(1,644,CvType.CV_32FC1);

Mat EginenValue = new Mat(644,1,CvType.CV_32FC1);

Mat EigenVector = new Mat(644,644,CvType.CV_32FC1);

core.PCACompute(srcMat,Avg,EigenVector,322)

How can I use PCACompute and PCAProject in java?

I am trying to reduce vector size usig PCA in java. I am dealing with 40 objects(col), and each object has 644 feature vector(row). I want to reduce feature vector size 50% which means resultant feature vector would be (322). I use following code segment,but could not get the right answer. How can I reduce using PCACommpute and PCAProject? Thanks in advance.

code:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

float[] a= new float[]{(....};

Mat srcMat = new Mat(644,40,CvType.CV_32FC1);

srcMat.put(0,0,a);

Mat Avg = new Mat(1,644,CvType.CV_32FC1);

Mat EginenValue = new Mat(644,1,CvType.CV_32FC1);

Mat EigenVector = new Mat(644,644,CvType.CV_32FC1);

core.PCACompute(srcMat,Avg,EigenVector,322)