spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DB Tsai <dbt...@stanford.edu>
Subject Re: MLlib-a problem of example code for L-BFGS
Date Fri, 13 Jun 2014 19:42:17 GMT
Hi Congrui,

Since it's private in mllib package, one workaround will be write your
code in scala file with mllib package in order to use the constructor
of LogisticRegressionModel.

Sincerely,

DB Tsai
-------------------------------------------------------
My Blog: https://www.dbtsai.com
LinkedIn: https://www.linkedin.com/in/dbtsai


On Fri, Jun 13, 2014 at 11:50 AM, Congrui Yi
<fixed-term.Congrui.Yi@us.bosch.com> wrote:
> Hi All,
>
> I'm new to Spark. Just tried out the example code on Spark website for
> L-BFGS. But the code "val model = new LogisticRegressionModel(..." gave me
> an error:
>
> <console>:19: error: constructor LogisticRegressionModel in class
> LogisticRegres
> sionModel cannot be accessed in class $iwC
>          val model = new LogisticRegressionModel(
>                   ^
>
> Then I checked the source code on github about the definition of the class
> LogisticRegressionModel. It says:
>
>
> It appears the reason is it has "private[mllib]" in the definition so access
> is restricted and it does not have a constructor either.
>
> So that's a contradiction.
>
> Thanks,
>
> BR,
>
> Congrui
>
>
>
> --
> View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/MLlib-a-problem-of-example-code-for-L-BFGS-tp7589.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.

Mime
View raw message