rime.util
Functions
|
Return a sparse matrix where each row contains k non-zero values. |
|
|
|
|
|
explode last few user events and match with item titles; return splits and discount weights; empty user_hist will be turned into a single pad_title. |
|
|
|
|
|
|
|
|
|
CAVEAT: use in conjunction with dataclass filter to avoid future-leaking bias |
|
assume the input is an exploded dataframe with block-wise indices >>> groupby_unexplode(pd.Series([1,2,3,4,5], index=[1,1,2,3,3])).to_dict() {1: [1, 2], 2: [3], 3: [4, 5]} >>> groupby_unexplode(pd.Series([1,2,3,4,5], index=[1,1,2,3,3]), index=[0,1,-1,2,3,4]).to_dict() {0: [], 1: [1, 2], -1: [], 2: [3], 3: [4, 5], 4: []} |
|
|
|
|
|
|
|
Classes
|
|
|
Modules
Detailed steps to solve the following convex optimization problem. |
|