|
1 | | -using ModelBasedCF |
2 | | -using Base.Test |
| 1 | +using Persa |
| 2 | +using Test |
| 3 | +using DataFrames |
3 | 4 |
|
4 | | -# write your own tests here |
5 | | -@test 1 == 2 |
| 5 | +function createdummydatasetone() |
| 6 | + df = DataFrame() |
| 7 | + df[!, :user] = [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7] |
| 8 | + df[!, :item] = [1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 4, 5, 6, 2, 4, 5] |
| 9 | + df[!, :rating] = [2.5, 3.5, 3.0, 3.5, 2.5, 3.0, 3, 3.5, 1.5, 5, 3, 3.5, 2.5, 3.0, 3.5, 4.0, 3.5, 3.0, 4.0, 2.5, 4.5, 3.0, 4.0, 2.0, 3.0, 2.0, 3.0, 3.0, 4.0, 5.0, 3.5, 3.0, 4.5, 4.0, 1.0] |
| 10 | + return df |
| 11 | +end |
| 12 | + |
| 13 | +function createdummydatasettwo() |
| 14 | + df = DataFrame() |
| 15 | + df[!, :user] = [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7] |
| 16 | + df[!, :item] = [1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 4, 5, 6, 2, 4, 5] |
| 17 | + df[!, :rating] = [2, 7, 3, 3, 8, 3, 3, 3, 1, 9, 3, 3, 2, 3, 10, 4, 3, 3, 4, 2, 4, 3, 4, 2, 3, 2, 3, 3, 4, 5, 9, 10, 7, 6, 8] |
| 18 | + return df |
| 19 | +end |
| 20 | +#### |
| 21 | + |
| 22 | +@test true |
0 commit comments