|  | @@ -230,7 +230,14 @@ public class FeatureTransformV2 {
 | 
	
		
			
				|  |  |                              featMap.put(baseKey + "@uv", FeatureUtils.log1(uv, log1Scale));
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          if (ts > 0) {
 | 
	
		
			
				|  |  | -                            featMap.put(baseKey + "@ts", 1 - FeatureUtils.getTimeDiff(currentMs, ts * 1000));
 | 
	
		
			
				|  |  | +                            long historyMs = ts * 1000;
 | 
	
		
			
				|  |  | +                            featMap.put(baseKey + "@ts", 1 - FeatureUtils.getTimeDiff(currentMs, historyMs));
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                            // history week & hour
 | 
	
		
			
				|  |  | +                            Calendar calendar = Calendar.getInstance();
 | 
	
		
			
				|  |  | +                            calendar.setTimeInMillis(historyMs);
 | 
	
		
			
				|  |  | +                            featMap.put(String.format("%s_week@%d", baseKey, calendar.get(Calendar.DAY_OF_WEEK)), 1.0);
 | 
	
		
			
				|  |  | +                            featMap.put(String.format("%s_hour@%d", baseKey, calendar.get(Calendar.HOUR_OF_DAY) + 1), 1.0);
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          if (null != hVideoMap && hVideoMap.containsKey(vid)) {
 | 
	
		
			
				|  |  |                              Map<String, String> hVideo = hVideoMap.get(vid);
 |