flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rawkintrevo <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2157] [ml] Create evaluation framework ...
Date Thu, 21 Apr 2016 13:19:00 GMT
Github user rawkintrevo commented on the pull request:

    https://github.com/apache/flink/pull/1849#issuecomment-212916215
  
    np, also RE: my comment on the docs- I think I can lend a hand there (I was actually testing
functionality to make sure I understood how it worked). Let me know if I can be of assistance.
    
    Also, I did some more hacking this morning...
    
    ```scala
    %flink
    
    import org.apache.flink.api.scala._
    
    import org.apache.flink.ml.preprocessing.StandardScaler
    val scaler = StandardScaler()//MinMaxScaler()
    
    import org.apache.flink.ml.evaluation.{RegressionScores, Scorer}
    val loss = RegressionScores.squaredLoss
    val scorer = new Scorer(loss)
    
    import org.apache.flink.ml.regression.MultipleLinearRegression
    val mlr = MultipleLinearRegression()
                                .setIterations(microIters)
                                .setConvergenceThreshold(0.001)
                                .setWarmStart(true)
    
    val pipeline = scaler.chainPredictor(mlr)
    val evaluationDS = survivalLV.map(x => (x.vector, x.label))
    
    pipeline.fit(survivalLV)
    //pipeline.evaluate(survivalLV).collect()
    scorer.evaluate(evaluationDS, pipeline).collect().head
    ```
    
    This throws the  `breeze.linalg...` error.  So I'm not sure exactly what is different,
but it would seem the breeze.linalg is close to the heart of the problem(?)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message