Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Personalized recommenders #3

Closed
George3d6 opened this issue Apr 3, 2018 · 2 comments
Closed

Issue with Personalized recommenders #3

George3d6 opened this issue Apr 3, 2018 · 2 comments
Assignees

Comments

@George3d6
Copy link

Running recommend on any personal recommender yields the following non-descriptive error:

ERROR: LoadError: BoundsError: attempt to access 16×16 Array{Float64,2} at index [0, Base.Slice(Base.OneTo(16))]
Stacktrace:
 [1] throw_boundserror(::Array{Float64,2}, ::Tuple{Int64,Base.Slice{Base.OneTo{Int64}}}) at ./abstractarray.jl:434
 [2] checkbounds at ./abstractarray.jl:362 [inlined]
 [3] macro expansion at ./multidimensional.jl:494 [inlined]
 [4] _getindex at ./multidimensional.jl:491 [inlined]
 [5] getindex(::Array{Float64,2}, ::Int64, ::Colon) at ./abstractarray.jl:883
 [6] predict(::Recommendation.UserKNN, ::Int64, ::Int64) at /home/george/.julia/v0.6/Recommendation/src/model/user_knn.jl:51
 [7] recommend(::Recommendation.UserKNN, ::Int64, ::Int64, ::Array{Int64,1}) at /home/george/.julia/v0.6/Recommendation/src/base_recommender.jl:19
 [8] macro expansion at /home/george/forecasting/individual_analysis/recommender.jl:42 [inlined]
 [9] anonymous at ./<missing>:?

The code was basically this:

da = DataAccessor(events, length(accounts), length(itemns))
recommender = UserKNN(da)
build(recommender)
...
for acc_index in accounts
    recommendations = recommend(recommender, acc_index, nr_recc, items_indexes)
end

The Baseline recommenders work just fine.

@takuti takuti self-assigned this Apr 4, 2018
@takuti
Copy link
Owner

takuti commented May 24, 2018

@George3d6 Sorry for delay. First of all, could you check if minimum account and item indices are 1, not 0; In Julia, "index" is one-origin.

@takuti
Copy link
Owner

takuti commented Mar 23, 2019

@George3d6 Closing issue for now. Feel free to reopen it if you have further problems.

@takuti takuti closed this as completed Mar 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants