public UserItemFeature(UserFeature userFeature, int itemId) { UserFeature = userFeature; PredictDate = userFeature.PredictDate; ItemId = itemId; UserId = userFeature.Id; }
public void WriteHeaders(System.IO.StreamWriter writer) { writer.Write("userid,itemid,label,is_online,"); //writer.Write("user_id,item_id,label,"); BaseFeature.WriteHeaders(writer, "ui"); UserFeature.WriteHeaders(writer); ItemFeature.WriteHeaders(writer); UserCategoryFeature.WriteHeaders(writer, "uc"); }
public override void Write(System.IO.StreamWriter writer) { writer.Write("{0},{1},{2},{3},", UserId, ItemId, Label ? 1 : 0, ItemFeature.IsOnline ? 1 : 0); //writer.Write(String.Format("{0},{1},{2},", UserId, ItemId, Label ? 1 : 0)); base.Write(writer); UserFeature.Write(writer); ItemFeature.Write(writer); UserCategoryFeature.Write(writer); }
public void AddUserFeature(UserFeature userFeature) { this.UserFeatureList.Add(userFeature); MaxUserFeature.CatchMaxValue(userFeature); MinUserFeature.CatchMinValue(userFeature); }