Comments (8)
But that loss is not the same function that is being minimized. The solver minimizes (or is supposed to minimize) the values over all entries, whereas the loss function calculates it over the present entries.
from rsparse.
Thanks for reporting, I will take a look. Actually I expect the problem is the same as in #35 - XtX
.
Which is certainly not what I'd expect as the Cholesky is a more exact method and should lead to better results.
Loss with Cholesky should be lower, but hit rate might be worse since we don't optimize it directly...
from rsparse.
@david-cortes could set logger to debug
and check the loss? From what I see cholesky achieves smaller (or about the same) loss:
library(rsparse)
library(lgr)
lg = get_logger('rsparse')
lg$set_threshold('debug')
data('movielens100k')
train = movielens100k
train = log1p(train)
for (seed in c(1, 2, 3)) {
for (solver in c('cholesky', 'conjugate_gradient')) {
model = WRMF$new(rank = 50, lambda = 1, solver = solver)
message(glue::glue("seed {seed}, solver {solver}"))
user_emb = model$fit_transform(train, n_iter = 10, convergence_tol = -1, cg_steps = 3)
}
}
from rsparse.
@david-cortes you are right! starting to forget all the details...
from rsparse.
Well I did some experiments calculating over all entries and they do indeed end up with similar loss. Weird that the resulting from Cholesky then performs worse at other metrics, and that it takes so little time.
from rsparse.
Did some more experiments this time, from the same movielens. After running for 10 iterations with seed=1, I get these losses:
- CG: 74202.05
- Cholesky: 74295.25
Whereas with the other package I was comparing, I get these:
- CG: 126483.4
- Cholesky: 78421.88
Wonder where the difference comes from...
from rsparse.
And if you remove arma::solve_opts::fast
argument from the solver?
from rsparse.
Then the loss does end up lower than for CG, even though in a test set it didn't improve HR@5 or AUC. I guess technically it is working as it should - that is, it minimizes the function it is intended to - so I'll close this.
from rsparse.
Related Issues (20)
- item_exclude HOT 2
- devtools::install_github("dselivanov/rsparse") Win7 Will not compile. HOT 15
- Classification Using Factorization Machines HOT 2
- How to use item_exclude HOT 1
- future float R version dependency HOT 2
- Error loading rsparse after install HOT 5
- Embarrassingly Shallow Autoencoders for Sparse Data HOT 1
- EigenRec: Generalizing PureSVD for Effective and Efficient Top-N Recommendations HOT 2
- HybridSVD: When Collaborative Information is Not Enough
- Optimization objective under explicit feedback HOT 7
- Non-negativity constraints HOT 10
- Instability in rsparse::WRMF convergence and loss function HOT 2
- Development version failing compilation with devtools::install_github("rexyai/rsparse") HOT 1
- user and item biases in WRMF and explicit feedback HOT 30
- WRMF user and item biases for implicit feedback data HOT 15
- Dead wikipedia link
- Configure script doesn't pick OpenMP
- Huge performance degradataion for WRMF HOT 1
- Q; Python wrappers? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsparse.