From reviews-return-915746-archive-asf-public=cust-asf.ponee.io@spark.apache.org Mon Sep 16 07:33:58 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id A4C57180638 for ; Mon, 16 Sep 2019 09:33:58 +0200 (CEST) Received: (qmail 9246 invoked by uid 500); 16 Sep 2019 07:33:58 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 9232 invoked by uid 99); 16 Sep 2019 07:33:58 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Sep 2019 07:33:58 +0000 From: GitBox To: reviews@spark.apache.org Subject: [GitHub] [spark] zhengruifeng commented on a change in pull request #25776: [SPARK-28985][PYTHON][ML] Add common classes (JavaPredictor/JavaClassificationModel/JavaProbabilisticClassifier) in PYTHON Message-ID: <156861923797.2728.1785239890439176316.gitbox@gitbox.apache.org> Date: Mon, 16 Sep 2019 07:33:57 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit zhengruifeng commented on a change in pull request #25776: [SPARK-28985][PYTHON][ML] Add common classes (JavaPredictor/JavaClassificationModel/JavaProbabilisticClassifier) in PYTHON URL: https://github.com/apache/spark/pull/25776#discussion_r324532245 ########## File path: python/pyspark/ml/classification.py ########## @@ -47,14 +47,41 @@ 'OneVsRest', 'OneVsRestModel'] +class JavaClassifierParams(HasRawPredictionCol, JavaPredictorParams): + """ + (Private) Java Classifier Params for classification tasks. + """ + pass + + +@inherit_doc +class JavaClassifier(JavaPredictor, JavaClassifierParams): + """ + Java Classifier for classification tasks. + Classes are indexed {0, 1, ..., numClasses - 1}. + """ + + def setRawPredictionCol(self, value): + """ + Sets the value of :py:attr:`rawPredictionCol`. + """ + return self._set(rawPredictionCol=value) + + @inherit_doc -class JavaClassificationModel(JavaPredictionModel): +class JavaClassificationModel(JavaPredictionModel, JavaClassifierParams): """ - (Private) Java Model produced by a ``Classifier``. + Java Model produced by a ``Classifier``. Classes are indexed {0, 1, ..., numClasses - 1}. To be mixed in with class:`pyspark.ml.JavaModel` """ + def setRawPredictionCol(self, value): Review comment: ditto ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org