Return-Path: X-Original-To: apmail-flink-dev-archive@www.apache.org Delivered-To: apmail-flink-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8011B10AA2 for ; Thu, 17 Sep 2015 17:05:30 +0000 (UTC) Received: (qmail 58287 invoked by uid 500); 17 Sep 2015 17:05:24 -0000 Delivered-To: apmail-flink-dev-archive@flink.apache.org Received: (qmail 58228 invoked by uid 500); 17 Sep 2015 17:05:24 -0000 Mailing-List: contact dev-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list dev@flink.apache.org Received: (qmail 58217 invoked by uid 99); 17 Sep 2015 17:05:23 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Sep 2015 17:05:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 45C0418099A for ; Thu, 17 Sep 2015 17:05:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.313 X-Spam-Level: **** X-Spam-Status: No, score=4.313 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id aP1tEVHfwFCP for ; Thu, 17 Sep 2015 17:05:11 +0000 (UTC) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 43FEE21270 for ; Thu, 17 Sep 2015 17:05:11 +0000 (UTC) Received: by obbbh8 with SMTP id bh8so18370159obb.0 for ; Thu, 17 Sep 2015 10:05:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=BP6h9Ln4+OT9ViaqU/7bFTzr/brZf6pcay8Pg+h8Wj4=; b=A9Uzvo/Xg9s97zcLnWH2RPs8GDvgXcSsDvZCdMUoYG/eWTCvrFJf82Y+Z02K0Pj8NW MZ4PKBrtHK5B4K1VOGUzu3OYbSeXKJMjgy2RpOQMl8Yfu9cyyneq7gdohAeKmH54TUEO 2YOTCeRmZyCa8Ofj+pSb2ect9Hdk/jjBYxmvHEg8zJTdblGTttkCiwEgEDPzJaulSU8z SO2/zoX5wsH2OWDQ7ljXhGGPoRKHOzkKBhu4e+DaqTYj0ayqHudEwz1lafFewfZtvsyW SUxgQe4TR9ASpzwxo71EXjX0t9EkR/rE9q2i3aeI0Xo2hh0/ze7FdEfe4ZFHvdJ42jLp yUgg== X-Gm-Message-State: ALoCoQkX/pbYH6VYb5TiOlDDReRQW8hiD+FDSoa4BeSQMMAiWHHiocNqDn6jRvEOxBBirlZ8+peg MIME-Version: 1.0 X-Received: by 10.60.177.129 with SMTP id cq1mr209274oec.42.1442509510071; Thu, 17 Sep 2015 10:05:10 -0700 (PDT) Received: by 10.182.44.98 with HTTP; Thu, 17 Sep 2015 10:05:10 -0700 (PDT) In-Reply-To: References: Date: Thu, 17 Sep 2015 20:05:10 +0300 Message-ID: Subject: Re: Flink ML linear regression issue From: Alexey Sapozhnikov To: Hanan Meyer Cc: dev@flink.apache.org Content-Type: multipart/alternative; boundary=089e01184a14ef1d71051ff46afb --089e01184a14ef1d71051ff46afb Content-Type: text/plain; charset=UTF-8 Hello everyone. Do you have a sample in Java how to implement Flink MultipleLinearRegression example? Scala is great, however we would like to see the exact example we could invoke it from Java if it is possible. Thanks and sorry for the interrupt. On Thu, Sep 17, 2015 at 4:27 PM, Hanan Meyer wrote: > Hi > > I'm using Flink ML 9.2.1 in order to perform a multiple linear regression > with a csv data file. > > The Scala sample code for it is pretty straightforward: > val mlr = MultipleLinearRegression() > > val parameters = ParameterMap() > > parameters.add(MultipleLinearRegression.Stepsize, 2.0) > parameters.add(MultipleLinearRegression.Iterations, 10) > parameters.add(MultipleLinearRegression.ConvergenceThreshold, 0.001) > val inputDS = env.fromCollection(data) > > mlr.fit(inputDS, parameters) > > When I'm using Java(8) the fit method includes 3 parameters > 1. dataset > 2.parameters > 3. object which implements -fitOperation interface > > multipleLinearRegression.fit(regressionDS, parameters,fitOperation); > > Is there a need to implement the fitOperation interface which have been > already > implemented in Flinks ml source code. > > Another option is using MultipleLinearRegression.fitMLR() method ,but I > haven't found a way to pass the train dataset to it as a parameter or by > setter. > > I'll be more than happy if you could guide me how to implement it in Java > > Thanks > > Hanan Meyer > > > > > -- *Regards* *Alexey Sapozhnikov* CTO& Co-Founder Scalabillit Inc Aba Even 10-C, Herzelia, Israel M : +972-52-2363823 E : alexey@scalabill.it W : http://www.scalabill.it YT - https://youtu.be/9Rj309PTOFA Map:http://mapta.gs/Scalabillit Revolutionizing Proof-of-Concept --089e01184a14ef1d71051ff46afb--