From commits-return-4610-archive-asf-public=cust-asf.ponee.io@predictionio.apache.org Tue Feb 13 05:56:15 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id EFC4D18067B for ; Tue, 13 Feb 2018 05:56:14 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DF662160C61; Tue, 13 Feb 2018 04:56:14 +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 D9C56160C62 for ; Tue, 13 Feb 2018 05:56:12 +0100 (CET) Received: (qmail 67975 invoked by uid 500); 13 Feb 2018 04:56:11 -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 67903 invoked by uid 99); 13 Feb 2018 04:56:11 -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; Tue, 13 Feb 2018 04:56:11 +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 EF887C24E9 for ; Tue, 13 Feb 2018 04:56:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -11.231 X-Spam-Level: X-Spam-Status: No, score=-11.231 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id A1hGgxNsMeo4 for ; Tue, 13 Feb 2018 04:56: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 5BB3860E36 for ; Tue, 13 Feb 2018 04:55:50 +0000 (UTC) Received: (qmail 63723 invoked by uid 99); 13 Feb 2018 04:55:42 -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; Tue, 13 Feb 2018 04:55:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 59B57F4DE8; Tue, 13 Feb 2018 04:55:39 +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: Tue, 13 Feb 2018 04:55:46 -0000 Message-Id: <6dfb793516f447a4bf932c2c9d4032f2@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [08/51] [partial] predictionio-site git commit: Documentation based on apache/predictionio#9547507e46ca8eacc3026d7646c3a352b0a6c680 http://git-wip-us.apache.org/repos/asf/predictionio-site/blob/0927bfda/api/current/org/apache/predictionio/controller/Params.html ---------------------------------------------------------------------- diff --git a/api/current/org/apache/predictionio/controller/Params.html b/api/current/org/apache/predictionio/controller/Params.html new file mode 100644 index 0000000..c6de5ae --- /dev/null +++ b/api/current/org/apache/predictionio/controller/Params.html @@ -0,0 +1,491 @@ + + + + Params - PredictionIO Scala API 0.12.0-incubating - org.apache.predictionio.controller.Params + + + + + + + + + + + + + + + +
+ Trait +

org.apache.predictionio.controller

+

Params

Related Doc: + package controller +

+ + Permalink + + +
+ +

+ + + trait + + + Params extends Serializable + +

+ +

Base trait for all kinds of parameters that will be passed to constructors +of different controller classes. +

+ Linear Supertypes +
Serializable, Serializable, AnyRef, Any
+
+ Known Subclasses + +
+ + +
+
+
+ Ordering +
    + +
  1. Alphabetic
  2. +
  3. By Inheritance
  4. +
+
+
+ Inherited
+
+
    +
  1. Params
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  6. +
+
+ +
    +
  1. Hide All
  2. +
  3. Show All
  4. +
+
+
+ Visibility +
  1. Public
  2. All
+
+
+ +
+
+ + + + + + +
+

Value Members

+
  1. + + +

    + + final + def + + + !=(arg0: Any): Boolean + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  2. + + +

    + + final + def + + + ##(): Int + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  3. + + +

    + + final + def + + + ==(arg0: Any): Boolean + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  4. + + +

    + + final + def + + + asInstanceOf[T0]: T0 + +

    + + Permalink + + +
    Definition Classes
    Any
    +
  5. + + +

    + + + def + + + clone(): AnyRef + +

    + + Permalink + + +
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    + @throws( + + ... + ) + +
    +
  6. + + +

    + + final + def + + + eq(arg0: AnyRef): Boolean + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    +
  7. + + +

    + + + def + + + equals(arg0: Any): Boolean + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  8. + + +

    + + + def + + + finalize(): Unit + +

    + + Permalink + + +
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    + @throws( + + classOf[java.lang.Throwable] + ) + +
    +
  9. + + +

    + + final + def + + + getClass(): Class[_] + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  10. + + +

    + + + def + + + hashCode(): Int + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  11. + + +

    + + final + def + + + isInstanceOf[T0]: Boolean + +

    + + Permalink + + +
    Definition Classes
    Any
    +
  12. + + +

    + + final + def + + + ne(arg0: AnyRef): Boolean + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    +
  13. + + +

    + + final + def + + + notify(): Unit + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    +
  14. + + +

    + + final + def + + + notifyAll(): Unit + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    +
  15. + + +

    + + final + def + + + synchronized[T0](arg0: ⇒ T0): T0 + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    +
  16. + + +

    + + + def + + + toString(): String + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  17. + + +

    + + final + def + + + wait(): Unit + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    Annotations
    + @throws( + + ... + ) + +
    +
  18. + + +

    + + final + def + + + wait(arg0: Long, arg1: Int): Unit + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    Annotations
    + @throws( + + ... + ) + +
    +
  19. + + +

    + + final + def + + + wait(arg0: Long): Unit + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    Annotations
    + @throws( + + ... + ) + +
    +
+
+ + + + +
+ +
+
+

Inherited from Serializable

+
+

Inherited from Serializable

+
+

Inherited from AnyRef

+
+

Inherited from Any

+
+ +
+ +
+
+

Ungrouped

+ +
+
+ +
+ +
+ + + + + + http://git-wip-us.apache.org/repos/asf/predictionio-site/blob/0927bfda/api/current/org/apache/predictionio/controller/PersistentModel.html ---------------------------------------------------------------------- diff --git a/api/current/org/apache/predictionio/controller/PersistentModel.html b/api/current/org/apache/predictionio/controller/PersistentModel.html new file mode 100644 index 0000000..30d3c18 --- /dev/null +++ b/api/current/org/apache/predictionio/controller/PersistentModel.html @@ -0,0 +1,537 @@ + + + + PersistentModel - PredictionIO Scala API 0.12.0-incubating - org.apache.predictionio.controller.PersistentModel + + + + + + + + + + + + + + + +
+ Trait +

org.apache.predictionio.controller

+

PersistentModel

Related Doc: + package controller +

+ + Permalink + + +
+ +

+ + + trait + + + PersistentModel[AP <: Params] extends AnyRef + +

+ +

Mix in and implement this trait if your model cannot be persisted by +PredictionIO automatically. A companion object extending +IPersistentModelLoader is required for PredictionIO to load the persisted +model automatically during deployment.

Notice that models generated by PAlgorithm cannot be persisted +automatically by nature and must implement these traits if model persistence +is desired.

class MyModel extends PersistentModel[MyParams] {
+  def save(id: String, params: MyParams, sc: SparkContext): Boolean = {
+    ...
+  }
+}
+
+object MyModel extends PersistentModelLoader[MyParams, MyModel] {
+  def apply(id: String, params: MyParams, sc: Option[SparkContext]): MyModel = {
+    ...
+  }
+}

In Java, all you need to do is to implement this interface, and add a static +method with 3 arguments of type String, Params, and SparkContext.

public class MyModel implements PersistentModel<MyParams>, Serializable {
+  ...
+  public boolean save(String id, MyParams params, SparkContext sc) {
+    ...
+  }
+
+  public static MyModel load(String id, Params params, SparkContext sc) {
+    ...
+  }
+  ...
+}
AP

Algorithm parameters class.

See also

PersistentModelLoader

+ Linear Supertypes + +
+ + +
+
+
+ Ordering +
    + +
  1. Alphabetic
  2. +
  3. By Inheritance
  4. +
+
+
+ Inherited
+
+
    +
  1. PersistentModel
  2. AnyRef
  3. Any
  4. +
+
+ +
    +
  1. Hide All
  2. +
  3. Show All
  4. +
+
+
+ Visibility +
  1. Public
  2. All
+
+
+ +
+
+ + + + +
+

Abstract Value Members

+
  1. + + +

    + + abstract + def + + + save(id: String, params: AP, sc: SparkContext): Boolean + +

    + + Permalink + + +

    Save the model to some persistent storage.

    Save the model to some persistent storage.

    This method should return true if the model has been saved successfully so +that PredictionIO knows that it can be restored later during deployment. +This method should return false if the model cannot be saved (or should +not be saved due to configuration) so that PredictionIO will re-train the +model during deployment. All arguments of this method are provided by +automatically by PredictionIO. +

    id

    ID of the run that trained this model.

    params

    Algorithm parameters that were used to train this model.

    sc

    An Apache Spark context.

    +
+
+ +
+

Concrete Value Members

+
  1. + + +

    + + final + def + + + !=(arg0: Any): Boolean + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  2. + + +

    + + final + def + + + ##(): Int + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  3. + + +

    + + final + def + + + ==(arg0: Any): Boolean + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  4. + + +

    + + final + def + + + asInstanceOf[T0]: T0 + +

    + + Permalink + + +
    Definition Classes
    Any
    +
  5. + + +

    + + + def + + + clone(): AnyRef + +

    + + Permalink + + +
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    + @throws( + + ... + ) + +
    +
  6. + + +

    + + final + def + + + eq(arg0: AnyRef): Boolean + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    +
  7. + + +

    + + + def + + + equals(arg0: Any): Boolean + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  8. + + +

    + + + def + + + finalize(): Unit + +

    + + Permalink + + +
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    + @throws( + + classOf[java.lang.Throwable] + ) + +
    +
  9. + + +

    + + final + def + + + getClass(): Class[_] + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  10. + + +

    + + + def + + + hashCode(): Int + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  11. + + +

    + + final + def + + + isInstanceOf[T0]: Boolean + +

    + + Permalink + + +
    Definition Classes
    Any
    +
  12. + + +

    + + final + def + + + ne(arg0: AnyRef): Boolean + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    +
  13. + + +

    + + final + def + + + notify(): Unit + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    +
  14. + + +

    + + final + def + + + notifyAll(): Unit + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    +
  15. + + +

    + + final + def + + + synchronized[T0](arg0: ⇒ T0): T0 + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    +
  16. + + +

    + + + def + + + toString(): String + +

    + + Permalink + + +
    Definition Classes
    AnyRef → Any
    +
  17. + + +

    + + final + def + + + wait(): Unit + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    Annotations
    + @throws( + + ... + ) + +
    +
  18. + + +

    + + final + def + + + wait(arg0: Long, arg1: Int): Unit + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    Annotations
    + @throws( + + ... + ) + +
    +
  19. + + +

    + + final + def + + + wait(arg0: Long): Unit + +

    + + Permalink + + +
    Definition Classes
    AnyRef
    Annotations
    + @throws( + + ... + ) + +
    +
+
+ + + + +
+ +
+
+

Inherited from AnyRef

+
+

Inherited from Any

+
+ +
+ +
+
+

Ungrouped

+ +
+
+ +
+ +
+ + + + + +