00bfbf96d7c9bcd8653edff6749556719115f3ee,lib/CoLin.py,AsyCoLinUCBUserSharedStruct,updateParameters,#AsyCoLinUCBUserSharedStruct#Any#Any#Any#Any#,50

Before Change


		//self.currentW = np.dot(self.currentW, self.W)
		//X = vectorize(np.outer(articlePicked.contextFeatureVector, self.currentW.T[userID])) 	
		
		X = vectorize(np.outer(articlePicked.contextFeatureVector, self.W.T[userID])) 
		self.A += np.outer(X, X)	
		self.b += click*X
		if update == "Inv":
			self.AInv =  np.linalg.inv(self.A)
		else:
			self.AInv = self.AInv - float(np.dot(self.AInv, np.dot(outer, self.AInv)))/(1.0+np.dot(np.transpose(X), np.dot(self.AInv, X)  ))
		

		self.UserTheta = matrixize(np.dot(self.AInv, self.b), len(articlePicked.contextFeatureVector)) 
		self.CoTheta = np.dot(self.UserTheta, self.W)

After Change



		self.BigW = np.kron(np.transpose(W), np.identity(n=featureDimension))

		self.CCA = np.dot(np.dot(self.BigW , self.AInv), np.transpose(self.BigW))

		self.alpha_t = 0.0
		self.sigma = 1.e-200   //Used in the high probability bound, i.e, with probability at least (1 - sigma) the confidence bound. So sigma should be very small
		self.lambda_ = lambda_
	def updateParameters(self, articlePicked, click,  userID, update="Inv"):
		X = vectorize(np.outer(articlePicked.contextFeatureVector, self.W.T[userID]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: huazhengwang/BanditLib
Commit Name: 00bfbf96d7c9bcd8653edff6749556719115f3ee
Time: 2017-11-15
Author: bjw4ph@virginia.edu
File Name: lib/CoLin.py
Class Name: AsyCoLinUCBUserSharedStruct
Method Name: updateParameters


Project Name: craffel/mir_eval
Commit Name: bb1de9e2b0efaf35b4b537ca9dfce9e96f30cf96
Time: 2017-08-18
Author: bmcfee@users.noreply.github.com
File Name: mir_eval/hierarchy.py
Class Name:
Method Name: _gauc


Project Name: Qiskit/qiskit-aqua
Commit Name: 9cb688f2063355320b770f6e0b4bd79c0422725a
Time: 2018-06-29
Author: imamichi@jp.ibm.com
File Name: qiskit_acqua/ising/tsp.py
Class Name:
Method Name: tsp_value