# Predict a subset from sequence of sets

I want to solve this data mining problem:

1. There is a sequence $$S(t) = [A_1,...,A_{t-1}]$$ .
2. Each $$A_i \subset U$$ are set.
3. Current time is $$t \in \mathbb{N}$$.
4. $$B$$ is a subset of $$A_t$$. ($$B \subset A_t$$)
5. $$U$$ is possible choices of a player.
6. $$I(S(t)) = \{1,...,t-1\}$$ is indices of the sets in sequence.
7. We can use $$B$$, $$S(t)$$ and $$I(S(t)) \cup \{t\}$$ to predict it .
8. We already know $$A_1,...,A_{t-1},B$$ but we don't know $$A_t-B$$.
9. Each element $$x \in A_i$$ only have ID of element. i.e. $$x \in \mathbb{N}$$.
10. Objective is to predict $$A_t - B$$.

For example, a user can input tags as $$A_i$$ like $$A_i =\{software, python \}$$ and we call it "post". He already posted $$A_1,...,A_{t-1}$$ and inputted $$B$$. We want to predict tags on current post $$t$$.

Or another example is book-recommendation. A user bought books like $$A_i = \{bookA, bookB\}$$ and $$i$$ is a time. If he already selects some books on current time $$t$$, it means $$|B|>0$$, and the purpose is to recommend $$A_t-B$$.

I've tried to build a co-occurrence graph with frequency weight, but its accuracy was not so good.

Could you tell me how to solve it?