We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
嗨,您好。请问正负样本是如何标记的呢? for key in user_map: sorted_user_bh = sorted(user_map[key], key=lambda x:x[1]) for line, t in sorted_user_bh: items = line.split("\t") asin = items[1] j = 0 while True: asin_neg_index = random.randint(0, len(item_list) - 1) asin_neg = item_list[asin_neg_index] if asin_neg == asin: continue items[1] = asin_neg print>>fo, "0" + "\t" + "\t".join(items) + "\t" + meta_map[asin_neg] j += 1 if j == 1: #negative sampling frequency break if asin in meta_map: print>>fo, "1" + "\t" + line + "\t" + meta_map[asin] else: print>>fo, "1" + "\t" + line + "\t" + "default_cat"
看这段代码,负样本是随机生成的?
The text was updated successfully, but these errors were encountered:
@mouna99 可以详解一下样本的构造过程吗?
Sorry, something went wrong.
No branches or pull requests
看这段代码,负样本是随机生成的?
The text was updated successfully, but these errors were encountered: