Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CaCaoCritics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bilel El Yaagoubi
CaCaoCritics
Commits
1d8d1eb0
Commit
1d8d1eb0
authored
2 years ago
by
Tom Bray
Browse files
Options
Downloads
Patches
Plain Diff
modification de l'id de l'algo
parent
21026235
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#42657
passed with warnings
2 years ago
Stage: lint
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
algo/adreco.py
+3
-3
3 additions, 3 deletions
algo/adreco.py
with
3 additions
and
3 deletions
algo/adreco.py
+
3
−
3
View file @
1d8d1eb0
...
...
@@ -204,7 +204,7 @@ def user_profile( user_index, moviesdf, usersdf, vectMatrix ):
similarity_scores_sorted
=
sorted
(
similarity_scores
,
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
#lists recommendations index of the movies, ordered by weights
recommendations_indices
=
[
t
[
0
]
for
t
in
similarity_scores_sorted
[
1
:(
10
0
+
1
)]]
recommendations_indices
=
[
t
[
0
]
for
t
in
similarity_scores_sorted
[
1
:(
3
0
+
1
)]]
return
recommendations_indices
...
...
@@ -238,11 +238,11 @@ def updateDB():
rec_indices
=
user_profile
(
i
,
moviesdf
,
usersdf
,
vect_matrix
)
if
rec_indices
!=
None
:
recdf
=
moviesdf
[
'
id
'
].
iloc
[
rec_indices
]
recdf
=
moviesdf
[
'
_
id
'
].
iloc
[
rec_indices
]
titledf
=
moviesdf
[
'
original_title
'
].
iloc
[
rec_indices
]
for
j
in
recdf
.
index
:
recommended_movies
.
append
(
int
(
recdf
[
j
])
)
recommended_movies
.
append
(
recdf
[
j
])
dict
[
'
recommended_movies
'
]
=
recommended_movies
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment