Giter Site home page Giter Site logo

hiltonrosenfeld / real-time-ai-movielens-astra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mukundha/real-time-ai-astra

0.0 0.0 0.0 1.01 MB

Real time AI demo with Astra based on MovieLens recommendations

License: Apache License 2.0

Python 100.00%

real-time-ai-movielens-astra's Introduction

Real Time AI with Astra

Recommended review: Understand Real-Time AI

Here, We review the role of Astra in ML lifecycle: Training [will follow soon with Inference, Feature store, Prediction store and Model monitoring]

Use the Data Loader in Astra Portal to upload the data/ratings_realtime.csv to Astra DB

For reference, auto-created table. Make sure to check the datatypes

CREATE TABLE demo.ratings_realtime (
    "userId" int,
    "movieId" int,
    last_rating decimal,
    last_watched_movie int,
    rating decimal,
    timestamp timestamp,
    PRIMARY KEY ("userId", "movieId")
)

Pre-requisites

pip install numpy
pip install pandas
pip install tensorflow
pip install scikit-learn
export CLIENT_ID=<ASTRA_CLIENT_ID>
export CLIENT_SECRET=<ASTRA_CLIENT_SECRET>
export KEYSPACE=<ASTRA_KEYSPACE>
export TABLE=<ASTRA_TRAINING_TABLE_NAME>
export BATCH_SIZE=<BATCH_SIZE>
export SECURE_CONNECT_BUNDLE_PATH=<ASTRA_SECURE_CONNECT_BUNDLE>

Training

python train.py

Trained model will be saved as movie_recommendation_realtime.h5

Citation

To acknowledge use of the dataset in publications, please cite the following paper:

F. Maxwell Harper and Joseph A. Konstan. 2015. The MovieLens Datasets: History and Context. ACM Transactions on Interactive Intelligent Systems (TiiS) 5, 4: 19:1โ€“19:19. https://doi.org/10.1145/2827872

real-time-ai-movielens-astra's People

Contributors

mukundha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.