Exemplo n.º 1
0
numFeaturesTrueP= getTotalCountFeature(type4, trueTable)
numFeaturesDecP= getTotalCountFeature(type4, decTable) 

numFeaturesPosP= getTotalCountFeature(type4, posTable)
numFeaturesNegP= getTotalCountFeature(type4, negTable) 

numFeaturesTrueGivenPP= getTotalCountFeature(type4, truePosTable)
numFeaturesDecGivenPP= getTotalCountFeature(type4, decPosTable) 

numFeaturesTrueGivenNP= getTotalCountFeature(type4, trueNegTable)
numFeaturesDecGivenNP= getTotalCountFeature(type4, decNegTable) 


for te in test:

	posOrNegC= SVM.getTrueOrDeceptive(type1, numFeaturesPosC, numFeaturesNegC, te[type1], posTable, negTable)
	posOrNegU= SVM.getTrueOrDeceptive(type2, numFeaturesPosU, numFeaturesNegU, te[type2], posTable, negTable)
	posOrNegB= SVM.getTrueOrDeceptive(type3, numFeaturesPosB, numFeaturesNegB, te[type3], posTable, negTable)
	posOrNegP= SVM.getTrueOrDeceptive(type4, numFeaturesPosP, numFeaturesNegP, te[type4], posTable, negTable)

	trueOrDecC=0
	trueOrDecU=0
	trueOrDecB=0
	trueOrDecP=0

	if posOrNegC == 1:
		trueOrDecC= SVM.getTrueOrDeceptive(type1, numFeaturesTrueGivenPC, numFeaturesDecGivenPC, te[type1],truePosTable, decPosTable)
	else:
		trueOrDecC= SVM.getTrueOrDeceptive(type1, numFeaturesTrueGivenNC, numFeaturesDecGivenNC, te[type1],trueNegTable, decNegTable)
	
	if posOrNegU == 1: