This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() | |
# input data | |
ui_array, r_array = read_data("./ml-100k/u.data") | |
n_user = length(unique([ui[1] for ui in ui_array])) | |
n_item = length(unique([ui[2] for ui in ui_array])) | |
γ::Float64 = 0.07 | |
λ::Float64 = 0.01 | |
# parameters | |
P, Q = fit(n_user, n_item, ui_array, r_array, 50, 5, γ, λ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using LinearAlgebra | |
function main() | |
# input data | |
train_data = read_data("./ml-100k/u.data") | |
n_user = length(unique([t[1] for t in train_data])) | |
n_item = length(unique([t[2] for t in train_data])) | |
# parameters | |
P, Q = fit(n_user, n_item, train_data) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.