English 中文(简体)
数据分类: 培训规模和测试病媒
原标题:Data Classification:sizes of training and test vectors

I have an application which decides whether a human is handwaving,running or walking. The idea is i have segmented an action,say handwave,to its poses. Let s say

例;

for human1:pose7-pose3-pose7-..... represents handwave
for human3:pose1-pose7-pose1-..... represents handwave
for human7:pose1-pose1-pose7-..... represents handwave
for human20:pose3-pose7-pose7-..... represents handwave

for human1 pose11-pose33-pose77-..... represents walking
for human2 pose31-pose33-pose77-..... represents walking
for human3 pose11-pose77-pose77-..... represents walking
for human20 pose11-pose33-pose11-..... represents walking

i 用于在马特拉布培训SVER和NeuralNet。

现在,我测试了图像。 再次重申 我对测试图像进行了分类。

For the vector sizes of test and train sets in MATLAB; SVM and Neural Net requires same vector sizes. To make it work;
If I append 0 (assume it like pose0-which is an invalid pose) , to make sizes equal I have really good performance.
If I copy initial poses at the beginning and append them to the end until sizes are equal performance decreases.

例如:

train set: pose1-pose2-pose4-pose7-pose2-pose4-pose7
(1st method)test set: pose3-pose1-pose4-0-0-0-0 or
(2nd method)test set: pose3-pose1-pose4-pose3-pose1-pose4-pose3

由于所附的数值是实际的数值,因此,我预计采用第二种方法进行更好的分类。 但pose0不是真实的。

Do you have any ideas ? Regards

最佳回答

就你而言,你的数据包括各有一系列特征的事例(如PoseSlot1、PoseSlot2、...、PoseSlotN)和类别值(直航、运行或行走)。

你们的问题是,所有班级的特征并不相同,例如,行走时有7个。

处理这类问题的标准方法是用missing Value标示这些空档,假定你的机器学习算法能够处理缺失的数值。

f1     f2    f3    f4    f5    f6    f7    class
-------------------------------------------------
pose1,pose2,pose4,pose7,pose2,pose4,pose7,running
pose3,pose1,pose4,    ?,    ?,    ?,    ?,walking

现在,你使用的第一个计算法是使用<代码>的简化标准?计算缺失值(相当于添加新的表示,表示缺失价值,而不是一个明确的<代码>?数值)。

重复价值的其他方式实际上造成了一个问题,而不是如果你认为是解决问题的。 你们实际上创造了相关的特征,而且正如你所知,大多数机器学习算法最符合一套独立的特征(通常通过作为预处理步骤进行特征选择来解决)。

问题回答

我不认为,从你的第一个方法中获得更好的业绩是不合理的。 我假定,你指的是在更好的分类方面表现较好。 我的推论是,交错序列通常较短。 因此,当你填满“无效”时,通过将不同行为列为无效行为,比实际构成更容易加以区别。





相关问题
MATLAB Solving equations problem

I want to solve these equations using MATLAB and I am sure there is a non zero solution. The equations are: 0.7071*x + 0.7071*z = x -0.5*x + 0.7071*y + 0.5*z = y -0.5*x - 0.7071*y +...

Difference between MATLAB s matrix notations

How do you read the following MATLAB codes? #1 K>> [p,d]=eig(A) // Not sure about the syntax. p = 0.5257 -0.8507 -0.8507 -0.5257 d = ...

preventing data from being freed when vector goes out of scope

Is there a way to transfer ownership of the data contained in a std::vector (pointed to by, say T*data) into another construct, preventing having "data" become a dangling pointer after the vector goes ...

Divide two polynomials using MATLAB

I want to divide p(x) by q(x) given that: p(x)=-5x^4+3x^2-6x q(x)=x^2+1 I tried: p=inline( -5*(x^4)+3*(x^2) , x ) p = Inline function: p(x) = -5*(x^4)+3*(x^2) q=inline( x^2+1 , x ) q = ...

matlab deals with Fibbonacci

The Fibonacci series is given as follows: 1, 2, 3, 5, 8, 13, 21, ... How can I write a script which calculates and prints the n-th Fibonacci term (for n>2), where n is inputed by the user. This ...

How do I plot lines between all points in a vector?

I have a vector containing some points in 2-D space. I want MATLAB to plot these points with lines drawn from every point to every other point. Basically, I want a graph with all vertices connected. ...

How do I create a string using a loop variable in MATLAB?

I have a loop like this: for i=1:no %some calculations fid = fopen( c:\out.txt , wt ); %write something to the file fclose(fid); end I want data to be written to different files like ...

热门标签