question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to design a system with low density?

See original GitHub issue

I have read through (most of) the issues and have the recommendation up and running but the result is not as good as I hoped. I have a few questions looking for your answer. Below is info about my current dataset:

user_features.shape = (79770, 26035) # avg features/user = 2
item_features.shape = (21093, 20157) # avg features/item = 4
interactions.shape = (79770, 21093)

I train with this code, which is similar to your example:

model = tensorrec.TensorRec()
model.fit(interactions, user_features, item_features, epochs=1000, verbose=True)

However, my hardware is not powerful enough so I had to picked samples from the full dataset instead of running it in full:

sample_user_features.shape = (4, 26035)
sample_interactions.shape = (4, 21093)

predicted_ranks = model.predict_rank(user_features=sample_user_features, item_features=item_features)
r_at_k = tensorrec.eval.recall_at_k(predicted_ranks, sample_interactions, k=10)
print(np.mean(r_at_k))

The recall@10 value is 0.00006. I manually inspected the predicted item for these users and it’s not good. So my questions are:

  1. I think my avg features/user of 2 and avg features/item of 4 are too small. Do you think so? Should the recommendation works with such low density?
  2. I choose 4 user ids from the dataset and build sample matrix to run the recall. I’m not confident about this step. Is this mathematically and statistically correct?
  3. I understand that you have implemented fit_partial. In my situation, the item features can increase over time. Will fit_partial works with resized matrix?

Thank you.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
daohoangsoncommented, Apr 21, 2019

@EricC91 I have had redone my input matrices so it’s denser and switched to use BalancedWMRBLossGraph. The result is good enough for our use case.

0reactions
ericcanadascommented, Apr 19, 2019

Hi @daohoangson,

I am confronted with almost the same results as you… Did you finally find parameters that work well?

Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Applying density - Material Design
To create scannable groups of content, use a less-dense grid layout in combination with high-density components. The denser your components become, the larger ......
Read more >
Analysis of Low Density Codes and Improved Designs Using ...
The only method we currently have for constructing ir- regular codes is by randomly choosing the irregular graph.
Read more >
UI/UX Principle #52: Manage Data Density, High-Level to Low ...
Approaches to Designing Different Data Structures. The two approaches we recommend are: 1) vertical data density, which starts with high level ...
Read more >
High or low density matters | Electronic Design
In general, larger board areas promote higher density because the PCB layout is more efficient. It's also true that a matrix usually has...
Read more >
Low-Density Spreading Codes for NOMA Systems and a ...
Improved low-density spreading (LDS) code designs based on the Gaussian separability criterion are conceived.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found