Пример #1
0
 def test_empty_sampling_rate_getSampleUserIDs(self):
     numUsers = 4
     minSimilarity = 0.0
     samplingRate = 0.0
     n = NearestNUserNeighborhood(self.similarity, self.model, numUsers,
                                  minSimilarity, samplingRate)
     self.assertEquals(0, len(n.getSampleUserIDs()))
Пример #2
0
	def test_empty_sampling_rate_getSampleUserIDs(self):
		numUsers = 4
		minSimilarity = 0.0
		samplingRate = 0.0
		n = NearestNUserNeighborhood(self.similarity,self.model,numUsers,minSimilarity,samplingRate)				
		self.assertEquals(0,len(n.getSampleUserIDs()))
Пример #3
0
 def test_min_numUsers_getSampleUserIDs(self):
     numUsers = 4
     minSimilarity = 0.0
     n = NearestNUserNeighborhood(self.similarity, self.model, numUsers,
                                  minSimilarity)
     self.assertEquals(8, len(n.getSampleUserIDs()))
Пример #4
0
	def test_min_numUsers_getSampleUserIDs(self):
		numUsers = 4
		minSimilarity = 0.0
		n = NearestNUserNeighborhood(self.similarity,self.model,numUsers,minSimilarity)				
		self.assertEquals(8,len(n.getSampleUserIDs()))