header
KNN 

Tag:
Edit edit   Starstar

Program Information

Name: KNN 
Domain: Machine learning
Functionality: Classifier in supervised learning 
Input: T:The Training Data  D:The Testing Data 
Output: L:The Label of testing data 

Reference

 Application of Metamorphic Testing to Supervised Classifiers   10.1109/QSIC.2009.26  

MR Information

MR1------

Description:
Property: $L_{1}=L_{2}$ 
Source input: $T_{1}$,$D_{1}$ 
Source output: $L_{1}$ 
Follow-up input: $T_{2},$D_{2
Follow-up output: $L_{2}$ 
Input relation:   Value of any subset of features in $T_{2}$ = k * correspoding value in $T_{1}$ + b, (k != 0),  Value of any subset of features in $D_{2}$ = k * correspoding value in $D_{1}$ + b, (k != 0) 
Output relation: $L_{1}=L_{2}$ 
Pattern:

MR2------

Description:
Property: $L_{1}=L_{2}$ 
Source input: $T_{1}$,$D_{1}$ 
Source output: $L_{1}$ 
Follow-up input: $T_{2},$D_{2
Follow-up output: $L_{2}$ 
Input relation: $D_{2}$:Permutation of attributes of all the samples in $D_{1}$, $T_{2}$: Permutation of attributes of $T_{1}$ 
Output relation: $L_{1}=L_{2}$ 
Pattern:

MR3------

Description:
Property: $L_{1}=L_{2}$ 
Source input: $T_{1}$,D 
Source output: $L_{1}$ 
Follow-up input: $T_{2}$,D 
Follow-up output: $L_{2}$ 
Input relation: $T_{2}$: Add an uninformative attribute to $T_{1}$(uninformative attribute: equally associated with each class label) 
Output relation: $L_{1}=L_{2}$ 
Pattern:

MR4------

Description:
Property: $L_{1}=L_{2}$ 
Source input: $T_{1}$,$D_{1}$ 
Source output: $L_{1}$ 
Follow-up input: $T_{2},$D_{2
Follow-up output: $L_{2}$ 
Input relation: $T_{2}$:Append $D_{1}$ and $L_{1}$ to $T_{1}$ 
Output relation: $L_{1}=L_{2}$ 
Pattern:

MR5------

Description:
Property: $L_{1}=L_{2}$ 
Source input: $T_{1}$,D 
Source output: $L_{1}$ 
Follow-up input: $T_{2}$,D 
Follow-up output: $L_{2}$ 
Input relation: $T_{2}$: Duplicate all samples in $T_{1}$ 
Output relation: $L_{1}=L_{2}$ 
Pattern:

MR6------

Description:
Property: $L_{1}=L_{2}$ 
Source input: $T_{1}$,D 
Source output: $L_{1}$ 
Follow-up input: $T_{2}$,D 
Follow-up output: $L_{2}$ 
Input relation: $T_{2}$: Re-label some of the samples in $T_{1}$ which do not have label $L_{1}$ 
Output relation: $L_{1}=L_{2}$ 
Pattern:
Insert title here