关于多示例学习
m
a
x
H
(
A
,
B
)
=
max
{
max
a
∈
A
min
b
∈
B
∥
a
−
b
∥
2
,
max
b
∈
B
min
a
∈
A
∥
b
−
a
∥
2
}
\mathrm{maxH}(\mathbf{A}, \mathbf{B}) = \max \{\max_{a \in \mathbf{A}} \min_{b \in \mathbf{B}} \|a - b\|_2, \max_{b \in \mathbf{B}} \min_{a \in \mathbf{A}} \|b - a\|_2\}
maxH(A,B)=max{a∈Amaxb∈Bmin∥a−b∥2,b∈Bmaxa∈Amin∥b−a∥2}
JAVA 代码:
double maxABDis=1;
double maxBADis=1;
for(int i=0;i<m;i++){
double minBuffer=10000;
for(int j=0;j<n;j++){
if(minBuffer>dis(a[i],b(i))){
minBuffer=dis(a[i],b(i));
}//of if
}//of for j
if(maxABDis<minBuffer){
maxABDis=minBuffer;
}//of if
}//of for i
for(int i=0;i<n;i++){
double minBuffer=10000;
for(int j=0;j<m;j++){
if(minBuffer>dis(b[i],a(i))){
minBuffer=dis(b[i],a(i));
}//of if
}//of for j
if(maxBADis<minBuffer){
maxBADis=minBuffer;
}//of if
}//of for i
if(maxABDis>maxBADis){
return maxABDis;
}
else{
return maxBADis;
}//of if
作业:
1.定义一个标签分布系统, 即各标签的值不是 0/1, 而是 [ 0 , 1 ] [0, 1] [0,1]区间的实数, 且同一对象的标签和为1.
答:Definition : A multi-label decision system is a tuple S = ( X , Y ) S = (\mathbf{X}, \mathbf{Y}) S=(X,Y) where X = [ x i j ] n × m ∈ R n × m \mathbf{X} = [x_{ij}]_{n \times m} \in \mathbb{R}^{n \times m} X=[xij]n×m∈Rn×m is the data matrix, Y = [ y i k ] n × l ∈ [ 0 , 1 ] n × l \mathbf{Y} = [y_{ik}]_{n \times l} \in[0, 1]^{n \times l} Y=[yik]n×l∈[0,1]n×l is the label matrix, n n n is the number of instances, m m m is the number of features, and l l l is the number of labels and ∑ k = 1 l y i k = 1 , i ∈ { 1 , 2 , … , n } \sum \limits_{k=1}^{l}y_{ik}=1,i \in \{1,2,\dots,n\} k=1∑lyik=1,i∈{1,2,…,n}.
2.找一篇小组的论文来详细分析数学表达式, 包括其涵义, 规范, 优点和缺点.
答:后续完善.