models/user.py
def update_profile(self, vec):
		"""
		Update the profile of the user with the new vec param
		:param vec: (np.array) vector of the tweet to add
		:return:
		"""

		assert type(vec) == np.array

		self.nb_click += 1
		for i in range(len(self.vector)):
			self.vector[i] = (self.vector[i] * (self.nb_click - 1)) / self.nb_click + (vec[i] / self.nb_click)

		tpc = TopicsClassifier()
		pp = PredictionProfile()
		self.predict_profile(tpc, pp)

		DB.get_instance().commit()

		Update the profile of the user with the new vec param
		:param vec: (np.array) vector of the tweet to add
		:return:
		
Update the profile of the user with the new vec param
Update the profile of the user with the new vec param
def update_profile(self, vec):
		assert type(vec) == np.array
		self.nb_click += 1
		for i in range(len(self.vector)):
			self.vector[i] = (self.vector[i] * (self.nb_click - 1)) / self.nb_click + (vec[i] / self.nb_click)
		tpc = TopicsClassifier()
		pp = PredictionProfile()
		self.predict_profile(tpc, pp)
		DB.get_instance().commit()
def update_profile ( self , vec ) : assert type ( vec ) == np . array self . nb_click += 1 for i in range ( len ( self . vector ) ) : self . vector [ i ] = ( self . vector [ i ] * ( self . nb_click - 1 ) ) / self . nb_click + ( vec [ i ] / self . nb_click ) tpc = TopicsClassifier ( ) pp = PredictionProfile ( ) self . predict_profile ( tpc , pp ) DB . get_instance ( ) . commit ( )
Update the profile of the user with the new vec param
Update the profile of the user with the new vec param
"""
		Update the profile of the user with the new vec param
		:param vec: (np.array) vector of the tweet to add
		:return:
		"""
None
self
vec
(np.array) vector of the tweet to add
( np . array ) vector of the tweet to add