From commits-return-4856-archive-asf-public=cust-asf.ponee.io@predictionio.apache.org Wed Mar 14 23:08:31 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id ECCD2180654 for ; Wed, 14 Mar 2018 23:08:28 +0100 (CET) Received: (qmail 68395 invoked by uid 500); 14 Mar 2018 22:08:28 -0000 Mailing-List: contact commits-help@predictionio.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@predictionio.apache.org Delivered-To: mailing list commits@predictionio.apache.org Received: (qmail 68386 invoked by uid 99); 14 Mar 2018 22:08:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2018 22:08:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 7D8FAC6098 for ; Wed, 14 Mar 2018 22:08:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -11.721 X-Spam-Level: X-Spam-Status: No, score=-11.721 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id fQk63VCct8nh for ; Wed, 14 Mar 2018 22:08:21 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 30BA55FD4E for ; Wed, 14 Mar 2018 22:08:01 +0000 (UTC) Received: (qmail 63222 invoked by uid 99); 14 Mar 2018 22:08:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2018 22:08:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 89E3FF662A; Wed, 14 Mar 2018 22:08:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: git-site-role@apache.org To: commits@predictionio.incubator.apache.org Date: Wed, 14 Mar 2018 22:08:26 -0000 Message-Id: <6f7ccae8e9564990a1e46ed16f54e9ac@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [27/51] [partial] predictionio-site git commit: Documentation based on apache/predictionio#439b87e07a59021839ea3fe2cd40f98fb8d4cc5f http://git-wip-us.apache.org/repos/asf/predictionio-site/blob/9d2bd407/datacollection/eventmodel/index.html ---------------------------------------------------------------------- diff --git a/datacollection/eventmodel/index.html b/datacollection/eventmodel/index.html index 64e4c0e..40c254c 100644 --- a/datacollection/eventmodel/index.html +++ b/datacollection/eventmodel/index.html @@ -1,4 +1,4 @@ -Events Modeling

This section expl ains how to model your application data as events.

Entity: it's the real world object involved in the events. The entity may perform the events, or interact with other entity (which became targetEntity in an event).

For example, your application may have users and some items which the user can interact with. Then you can model them as two entity types: user and item and the entityId can uniquely identify the entity within each entityType (e.g. user with ID 1, item with ID 1).

An entity may peform some events (e.g user 1 does something), and entity may have properties associated with it (e.g. user may have gender, age, email etc). Hence, events involve entities and there are three types of events, respectively:

  1. Generic events performed by an entity.
  2. Special events for recording changes of an entity's properties
  3. Batch events
  4. They are explained in details below.

    1. Generic events performed by an entity

    Whenever the entity performs an action, you can describe such event as entity "verb" targetEntity with "some extra information". The "targetEntity" and "some extra information" can be optional. The "verb" can be used as the name of the "event". The "some extra information" can be recorded as properties of the event.

    The following are some simple examples:

    • user-1 signs-up
    1
    +Events Modeling

    This section explains how to model yo ur application data as events.

    Entity: it's the real world object involved in the events. The entity may perform the events, or interact with other entity (which became targetEntity in an event).

    For example, your application may have users and some items which the user can interact with. Then you can model them as two entity types: user and item and the entityId can uniquely identify the entity within each entityType (e.g. user with ID 1, item with ID 1).

    An entity may peform some events (e.g user 1 does something), and entity may have properties associated with it (e.g. user may have gender, age, email etc). Hence, events involve entities and there are three types of events, respectively:

    1. Generic events performed by an entity.
    2. Special events for recording changes of an entity's properties
    3. Batch events

    They are expl ained in details below.

    1. Generic events performed by an entity

    Whenever the entity performs an action, you can describe such event as entity "verb" targetEntity with "some extra information". The "targetEntity" and "some extra information" can be optional. The "verb" can be used as the name of the "event". The "some extra information" can be recorded as properties of the event.

    The following are some simple examples:

    • user-1 signs-up
    1
     2
     3
     4
    @@ -287,7 +287,7 @@ Content-Length: 41
         },
         …
     ]
    -

    Notice that each subrequest receives a status response. The limit of 50 events per batch requests is in line with Facebook, Mixpanel, SegmentIO and other event syncs that accept batches.

    PredictionIO on Twitter PredictionIO on Facebook

    PredictionIO Docs

    Event Server Overview

    Apache PredictionIO offers an Event Server that collects data in an event-based style via a RESTful API. By default, Event Server uses Apache HBase as data store.

    EventServer Highlight

    What data should I collect?

    The Event Server can collect and store arbitrary events. At the beginning of your project, it is recommended to collect as much data as you can. Later on, you can exclude data that are not relevant to your predictive model in Data Preparator.

    Recommendation Engine

    With Collaborative Filtering based Recommendation Engine, a common pattern is

    1
    user -- action -- item
    -

    where users and items have properties associated with them.

    For example, for personalized book recommendation, some events to collect would be

    • User 1 purchased product X
    • User 2 viewed product Y
    • User 1 added product Z in the cart

    User properties can be gender, age, location, etc. Item properties can be genre, author, and other attributes that may be related to the the user's preference.

    Data collection varies quite a bit based on your application and your prediction goal. We are happy to assist you with your questions.

    Apache PredictionIO offers an Event Server that collects data in an event-based style via a RESTful API. By default, Event Server uses Apache HBase as data store.

    EventServer Highlight

    What data should I collect?

    The Event Server can collect and store arbitrary events. At the beginning of your project, it is recommended to collect as much data as you can. Later on, you can exclude data that are not relevant to your predictive model in Data Preparator.

    Recommendation Engine

    With Collaborative Filtering based Recommendation Engine, a common pattern is

    1
    user -- action -- item
    +

    where users and items have properties associated with them.

    For example, for personalized book recommendation, some events to collect would be

    • User 1 purchased product X
    • User 2 viewed product Y
    • User 1 added product Z in the cart

    User properties can be gender, age, location, etc. Item properties can be genre, author, and other attributes that may be related to the the user's preference.

    Data collection varies quite a bit based on your application and your prediction goal. We are happy to assist you with your questions.