Skip to content

A demo app to show how the implementation results look like when AWS Personalize is trained with movie lens dataset.

License

Notifications You must be signed in to change notification settings

guvener/laravel-aws-personalized-demo

Repository files navigation

Laravel AWS Personalize Demo

A demo app to show how the implementation results look like when AWS Personalize is trained with movie lens dataset.

AWS hands on lab movie recommendations lab

Create real-time, personalized movie recommendations with Personalize hands on AWS Lab Link


Browse demo app on movies.figurava.com.


MovieLens' full dataset is used instead of small sub version. Dataset contains 26 million ratings, 1.1 million tags, 58000 movies 1900 anonymous viewers.

Note: App is deployed to check results of personalize responses of the lab. Demo is not related to Amazon Web Services. Personalization results may differ according to your recipe settings. Demo is not a reference, it is intended to you save some time. Feel free to use as a starting point and try yourself.

Installation

Clone this repository and install dependencies.

git clone https://github.com/guvener/laravel-aws-personalized-demo.git
composer install
# optional valet link

Open installed folder and copy sample environment file .env.sample to .env and set up.

cp .env.example .env
php artisan key:generate

Configure your database in the .env file and run migrate.

php artisan migrate

Download demo database dump and import.

Configuration

Configuration file: config/personalize.php

[
    // App\Actions\Personalize/PersonalizeViewer needs following configurations filled to make AWS Personalize Requests
    'campaign_arn' => env('CAMPAIGN_ARN'),
    'aws_key' => env('AWS_ACCESS_KEY_ID'),
    'aws_secret' => env('AWS_SECRET_ACCESS_KEY'),
    'aws_region' => env('AWS_DEFAULT_REGION'),

    // App\Models\Link needs Open Movie Database API key filled to get movie metadata
    'omdb_key' => env('OMDB_KEY')
]

Models and Data

  • MySQL database dump can be downloaded on the movie data repository.
  • Default Laravel User and Jetstream tables are kept for later possible use cases.
  • movies, ratings, tags and links tables are exactly as movielens dataset ml-latest.zip.
  • viewers table is introduced for storing movielens dataset's users (users table is reserved for Laravel).
  • viewers table has cached personalized movie recommendations to review personalized responses before training your own personalized model.

Suggestions

In this demo SageMaker is trained with USER_PERSONALIZATION recipe, consider RELATED_ITEMS recipe for getting similar movies.

More to read

Amazon Personalize Runtime for PHP Documentation

Amazon Personalize dynamic filters blog post by AWS Feed

License

Laravel AWS Personalize Demo App is open-sourced software licensed under the MIT license.

About

A demo app to show how the implementation results look like when AWS Personalize is trained with movie lens dataset.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published