Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🦖 Streamlined Recommender Systems with TensorFlow and KubeFlow

License

NotificationsYou must be signed in to change notification settings

joseprsm/rexify

Repository files navigation



BuildLicenseDocumentationGitHub release

Rexify is a library to streamline recommender systems model development.

In essence, Rexify adapts dynamically to your data, and outputs high-performing TensorFlowmodels that may be used wherever you want, independently of your data. Rexify also includesmodules to deal with feature engineering as Scikit-Learn Transformers and Pipelines.

With Rexify, users may easily train Recommender Systems models, just by specifying what theirdata looks like. Rexify also comes equipped with pre-built machine learning pipelines which canbe used serverlessly.

What is Rexify?

Rexify is a low-code personalization tool, that makes use of traditional machine learningframeworks, such as Scikit-Learn and TensorFlow, to create scalable Recommender Systemsworkflows that anyone can use.

Who is it for?

Rexify is a project that simplifies and standardizes the workflow of recommender systems. It ismostly geared towards people with little to no machine learning knowledge, that want to implementsomewhat scalable Recommender Systems in their applications.

Installation

The easiest way to install Rexify is viapip:

pip install rexify

Quick Tour

Rexify is meant to be usable right out of the box. All you need to set up your model is interactiondata - something that kind of looks like this:

user_iditem_idtimestampevent_type
22672021/05/13Purchase
3792021/04/11Page View
224732021/04/11Add to Cart
............
358512021/04/11Purchase

Additionally, we'll have to have configured a schema for the data.This schema is what will allow Rexify to generate a dynamic model and preprocessing steps.The schema should be comprised of two dictionaries (user,ìtem) and two key-valuepairs:event_type (which should point to the column of the event type) andtimestamp (which should point to the timestamp column)

Each of these dictionaries should consist of features and internal data types,such as:id,category,number. More data types will be availablein the future.

{"user": {"user_id":"id","age":"number"  },"item": {"item_id":"id","category":"category"  },"timestamp":"timestamp""event_type":"event_type"}

Essentially, what Rexify will do is take the schema, and dynamically adapt to the data.

There are two main components in Rexify workflows:FeatureExtractor andRecommender.

TheFeatureExtractor is a scikit-learn Transformer that basically takes the schema ofthe data, and transforms the event data accordingly. Another method.make_dataset(),converts the transformed data into atf.data.Dataset, all correctly configured to be fedto theRecommender model.

Recommender is atfrs.Model that basically implements the Query and Candidate towers.During training, the Query tower will take the user ID, user features, and context, tolearn an embedding; the Candidate tower will do the same for the item ID and its features.

More information about how theFeatureExtractor and theRecommender works can be foundhere.

A sample Rexify workflow should sort of look like this:

importpandasaspdfromrexifyimportSchema,FeatureExtractor,Recommenderevents=pd.read_csv('path/to/events/data')schema=Schema.load('path/to/schema')fe=FeatureExtractor(schema,users='path/to/users/data',items='path/to/events/data',return_dataset=True)x=fe.fit(events).transform(events)model=Recommender(**fe.model_params)model.compile()model.fit(events,batch_size=512)

When training is complete, you'll have a trainedtf.keras.Model ready to be used, asyou normally would.

Alternatively, you can also run:

python -m rexify.pipeline -p events=$EVENTS_PATH -p users=$USER_PATH -p items=$ITEMS_PATH -p schema=$SCHEMA_PATH

Which will generate apipeline.json file, that you can use on Kubeflow Pipelines (or Vertex AI Pipelines).

License

MIT


[8]ページ先頭

©2009-2025 Movatter.jp