Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 31B71200B6B for ; Thu, 25 Aug 2016 22:14:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 304BB160AC6; Thu, 25 Aug 2016 20:14:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 33B32160AA4 for ; Thu, 25 Aug 2016 22:14:15 +0200 (CEST) Received: (qmail 13790 invoked by uid 500); 25 Aug 2016 20:14:14 -0000 Mailing-List: contact commits-help@predictionio.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@predictionio.incubator.apache.org Delivered-To: mailing list commits@predictionio.incubator.apache.org Received: (qmail 13781 invoked by uid 99); 25 Aug 2016 20:14:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2016 20:14:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E061C1A12B1 for ; Thu, 25 Aug 2016 20:14:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ondElml5DovY for ; Thu, 25 Aug 2016 20:14:06 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 57CE660E35 for ; Thu, 25 Aug 2016 20:13:58 +0000 (UTC) Received: (qmail 12429 invoked by uid 99); 25 Aug 2016 20:13:56 -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; Thu, 25 Aug 2016 20:13:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 65AC2E7E18; Thu, 25 Aug 2016 20:13:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: donald@apache.org To: commits@predictionio.incubator.apache.org Date: Thu, 25 Aug 2016 20:14:04 -0000 Message-Id: <252a0f6e248042b7b46cdce5425641ba@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [09/51] [partial] incubator-predictionio-site git commit: Update template gallery archived-at: Thu, 25 Aug 2016 20:14:17 -0000 http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/afc2fa9a/templates/classification/transform-data/index.html ---------------------------------------------------------------------- diff --git a/templates/classification/transform-data/index.html b/templates/classification/transform-data/index.html index 8ce2236..2d1fde8 100644 --- a/templates/classification/transform-data/index.html +++ b/templates/classification/transform-data/index.html @@ -1,4 +1,4 @@ -

PredictionIO's DASE architecture brings the separation-of-concerns design principle to predictive engine development. DASE stands for the following components of an engine:

  • Data - includes Data Source and Data Preparator
  • Algorithm(s)
  • Serving
  • Evaluator

Let's look at the code and see how you can customize the engine y ou built from the Complementary Purchase Engine Template.

Evaluator will not be covered in this tutorial.

The Engine Design

As you can see from the Quick Start, MyComplementaryPurchase takes a JSON prediction query, e.g. { "items" : ["s2i1"], "num" : 3 }, and return a JSON predicted result. In MyComplementaryPurchase/src/main/scala/Engine.scala, the Query case class defines the format of such query:

1
+DASE Components Explained (Complementary Purchase)

PredictionIO's DASE architecture brings the separation-of-concerns design principle to predictive engine development. DASE stands for the following components of an engine:

  • Data - includes Data Source and Data Preparator
  • Algorithm(s)
  • Serving
  • Evaluator

Let's look at the code and see how you can customize the engine you b uilt from the Complementary Purchase Engine Template.

Evaluator will not be covered in this tutorial.

The Engine Design

As you can see from the Quick Start, MyComplementaryPurchase takes a JSON prediction query, e.g. { "items" : ["s2i1"], "num" : 3 }, and return a JSON predicted result. In MyComplementaryPurchase/src/main/scala/Engine.scala, the Query case class defines the format of such query:

1
 2
case class Query(items: Set[String], num: Int)
   extends Serializable
 

The PredictedResult case class defines the format of predicted result, such as

1

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/afc2fa9a/templates/complementarypurchase/dase/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/complementarypurchase/dase/index.html.gz b/templates/complementarypurchase/dase/index.html.gz
index a72c226..76d3545 100644
Binary files a/templates/complementarypurchase/dase/index.html.gz and b/templates/complementarypurchase/dase/index.html.gz differ