使用更改的用户/项目对培训tensorflow推荐检索模型的问题

发布于 2025-02-13 18:58:57 字数 714 浏览 1 评论 0原文

当训练a tensorflow检索模型时,我对用户/项目对培训数据有问题。

我有以下两个数据集:

  1. 在特定时期内的用户/项目对。这表示用户在某个时间点查看的项目。
  2. 同一时期的项目列表。

我的问题是,在特定时期内,在某些时间添加并删除了一些项目。这意味着,根据时间,用户只能查看部分而不是所有可用的项目。

例如,假设您在一段时间内具有以下用户和项目的以下活动。对于此示例,假设item_a,item_b和item_c是类似的产品类型。

Jan 1  - item_A - listed
Jan 10 - item_B - listed  
Jan 10 - user_1 views item_A and item_B
Jan 11 - item_C - listed
Jan 13 - item_A - removed
Jan 14 - user_2 views item_B and item_C

在上面的示例中,在user_2查看的项目B和C时,item_a不可用,因此将item_a视为负示例,这是不正确的。

创建培训数据时,是否有任何特殊方法可以处理这些类型的问题?

I have an issue with user/item pairs training data when training a tensorflow retrieval model.

I have following two datasets:

  1. Pairs of user/items over a specific period. This represents an item which the user has viewed at a point in time.
  2. A complete list of items for that same period.

The problem I have is that in a specific period, some items were added and removed at certain times. Which meant, depending on the time, users were only able to view part and not all available items.

For example, let's say you have the following activity of the user and items over a period of time. For this example assume that item_A, item_B and item_C are a similar type of product.

Jan 1  - item_A - listed
Jan 10 - item_B - listed  
Jan 10 - user_1 views item_A and item_B
Jan 11 - item_C - listed
Jan 13 - item_A - removed
Jan 14 - user_2 views item_B and item_C

In the example above item_A was not available at the time user_2 viewed items B and C, so it counts item_A as a negative sample, which is not correct.

Is there any particular way to handle these types of issues when creating training data?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怎言笑 2025-02-20 18:58:57

尝试在实时数据集中附加项目(1。同一时期的项目的完整列表。及时。)作为可用_items的新列表。即使目前尚不可用该项目,您也可以获取所有可用项目的列表。对用户的访问必须给予新创建的列表。您还可以添加一个列作为可用性(如果在当前向用户显示可用性)。这可能会对您有所帮助。

l_avail=[]#to get all available items where user can see all the available items
l=[]#to update the availabiility
import pandas as pd
  
# Define a dictionary containing items data
data = {'items': ['A', 'B', 'C']}#list of available items l_avail
        
# Convert the dictionary into DataFrame
df = pd.DataFrame(data)
  
# Declare a list that is to be converted into a column
availability = [0, 1, 1, 0] 
df['Availability'] = address

print(df)
# to do list and remove to respective list
def LISTED(x):
    l.append(x)
    l_avail.append(x)
def REMOVE(x):
    l.remove(x)

这是一个粗略的代码,可以帮助您了解我的想法。 :)

try to append the items from the real-time datasets (1. A complete list of items for that same period. 2. and from Pairs of user/items over a specific period. Which represents an item that the user has viewed at a point in time.) to a new list as an available_items. even though the item is currently not available, you can get a list of all available items. access to the user must be given to the newly created list. you can also add a column as availability (if to show the user the availability at the current time). This MAY help you.

l_avail=[]#to get all available items where user can see all the available items
l=[]#to update the availabiility
import pandas as pd
  
# Define a dictionary containing items data
data = {'items': ['A', 'B', 'C']}#list of available items l_avail
        
# Convert the dictionary into DataFrame
df = pd.DataFrame(data)
  
# Declare a list that is to be converted into a column
availability = [0, 1, 1, 0] 
df['Availability'] = address

print(df)
# to do list and remove to respective list
def LISTED(x):
    l.append(x)
    l_avail.append(x)
def REMOVE(x):
    l.remove(x)

this is a rough code that may help you to get my idea. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文