Solve this ML problem:
Description:
One of the most popular types of content platforms are video hosting platforms.
Viewing duration is one of the key factors that influence recommendation algorithms, content optimization, and user interaction strategies. Models that can accurately predict user interaction with content allow platforms to better match videos to viewers, increase engagement, and provide a better user experience.
Data:
In this task, you are tasked with building a model that can determine whether a user will watch a given video for a long period of time, based on data about their previous interactions with the content and the characteristics of the video itself. The focus is on unauthorized users, so this data is characterized by the presence of a large number of short sessions. Pay attention to the need to process large amounts of data. When solving, you may benefit from skills in optimizing the resources used, working with batches, incremental pre-training, and ensembling models trained on parts of the sample.
Determining the long view:
The target variable for which you need to provide a prediction for your model is the fact that a user has a long view.
* For videos longer than 5 minutes: a view is considered long if the user has watched more than 25% of the video duration.
* For videos less than or equal to 5 minutes: a view is considered long if the user has watched more than 30 seconds.
In other cases, viewing is not considered long, the target variable takes the value 0.
Data reference
Data composition:
- train.parquet contains browsing logs, including information about users, browsing time, location, and video.
- test.parquet contains information about users and videos for which you need to provide predictions to your model.
The files contain the following variables:
1. event_timestamp - event timestamp
2. video_id - unique video ID
3. watchtime (for train only) - watchtime in seconds
4. region - user's region of location
5. city - city of user location
6. user_id - unique user ID
video_stat.parquet includes statistics and metadata for all videos:
1. video_id - unique video ID
2. v_pub_datetime - date of video publication on the platform (the moment when the video became available on Rutube in public access)
3. v _total_comments - total number of comments under the video
4. v_year_views - total number of views of the video
5. v_month_views - number of video views for the last month
6. v_week_views - number of video views for the last week
7. v_day_views - number of video views for the last day
8. v_likes - total number of likes for the video
9. v_dislikes - total number of dislikes for the video
10. v_duration - total video duration in seconds.
11. ﻿﻿﻿﻿v_cr_click_like_7_days - percentage of views that resulted in liking the video in the last 7 days
12. v_cr_click_dislike_7_days - the percentage of views that resulted in disliking the video in the last 7 days.
7 days
13. v_cr_click_vtop_7_days - percentage of views that resulted in clicking the “top” button for the last 7 days
14. v_cr_click_long_view_7_days - percentage of long views over the last 7 days
15. v_cr_click_comment_7_days - percentage of views that resulted in a comment in the last 7 days
16. v_cr_click_like_30_days - percentage of views that resulted in liking the video in the last 30 days
17. v_cr_click _dislike_30_days - percentage of views that led to disliking the video in the last 30 days
last 30 days
18. v_cr_click_vtop_30_days - percentage of views that resulted in clicking the “top” button in the last 30 days
19. v_cr_click_long_view_30_days - percentage of long views in the last 30 days
20. v_cr_click_comment_30_days - percentage of views that resulted in a comment in the last 30 days
21. v_cr_click_click_like_1_days - percentage of views that resulted in liking the video over the last day
22. v_cr_click_dislike_1_days - percentage of views that resulted in disliking the video for the last day
23. v_cr_click_vtop_1_days - percentage of views that resulted in clicking the “top” button for the last day
24. v_cr_click _long_view_1_days - percentage of long views for the last day
25. v_cr_click_comment_1_days - percentage of views that led to commenting over the last day
26. title - video title
27. description - video description
28. v_avg_watchtime_1_day - average duration of video views for 1 day
29. v_avg_watchtime_7_day - average duration of video viewing for 7 days
30. v_avg_watchtime_30_day - average video duration per 30 days
31. v_frac_avg_watchtime_1_day_duration - ratio of the average duration of video viewing for 1 day (v_avg_watchtime_1_day) to the total video duration (v_duration)
32. v_frac_avg_watchtime_7_day_duration - the ratio of the average duration of the video viewed in 1 day (v_avg_watchtime_1_day) to the total video duration (v_duration).
33. v_frac_avg_watchtime_30_day_duration - the ratio of the average duration of the video viewed over 30 days (v_avg_watchtime_30_day) to the total duration of the video (v_duration)
34. v_category_popularity_percent_7_days - the percentage of views of the given video category from the total number of views for the last 7 days
35. v_category_popularity_percent_30_days - the percentage of views of this video category out of the total number of views for the last 30 days
36. v_long_views_1_days - number of long views for the last day
37. v_long_views_7_days - number of long views for the last 7 days
38. ﻿﻿﻿﻿V_long_views_30_days - number of long views for the last 30 days
39. author_id - unique identifier of the video author
40. category_id - unique identifier of the video category.

As a solution, upload a csv file that contains the object indexes from the test sample and the predictions of the presence of long views for a given user and video obtained using your solution.
Metric:
The task uses F1-Score as the quality metric.
The number of points for a task is determined using the formula:
Points = 300 * percentileofscore(F1s, F1), where
Points - number of points.
percentileofscore - function that calculates percentile rank,
F1s - F1 metric values of all participants,
F1s - F1 metric values of this participant.
When calculating points, the metric values of the participants whose solutions showed a better result than the attached example answer to the task are used. Solutions with metric values lower or equal to the value obtained with the help of the example are evaluated with 0 points.

Files: 
sample_submission.csv
test.parquet
video_stat.parquet