Re: FlinkML - Evaluate function should manage LabeledVector

2016-10-20 Thread Thomas FOURNIER
Done here: FLINK-4865 2016-10-20 14:07 GMT+02:00 Thomas FOURNIER : > Ok thanks. > > I'm going to create a specific JIRA on this. Ok ? > > 2016-10-20 12:54 GMT+02:00 Theodore Vasiloudis < > theodoros.vasilou...@gmail.com>: > >> I think this might

Re: FlinkML - Evaluate function should manage LabeledVector

2016-10-20 Thread Thomas FOURNIER
Ok thanks. I'm going to create a specific JIRA on this. Ok ? 2016-10-20 12:54 GMT+02:00 Theodore Vasiloudis < theodoros.vasilou...@gmail.com>: > I think this might be problematic with the current way we define the > predict operations because they require that both the Testing and > PredictionVa

Re: FlinkML - Evaluate function should manage LabeledVector

2016-10-20 Thread Theodore Vasiloudis
I think this might be problematic with the current way we define the predict operations because they require that both the Testing and PredictionValue types are available. Here's what I had to do to get it to work (in ml/pipeline/Predictor.scala): import org.apache.flink.ml.math.{Vector => FlinkV

Re: FlinkML - Evaluate function should manage LabeledVector

2016-10-19 Thread Thomas FOURNIER
Hi, Two questions: 1- I was thinking of doing this: implicit def evaluateLabeledVector[T <: LabeledVector] = { new EvaluateDataSetOperation[SVM,T,Double]() { override def evaluateDataSet(instance: SVM, evaluateParameters: ParameterMap, testing: DataSet[T]): DataSet[(Double, Double)] = {

Re: FlinkML - Evaluate function should manage LabeledVector

2016-10-19 Thread Theodore Vasiloudis
Hello Thomas, since you are calling evaluate here, you should be creating an EvaluateDataSet operation that works with LabeledVector, I see you are creating a new PredictOperation. On Wed, Oct 19, 2016 at 3:05 PM, Thomas FOURNIER < thomasfournier...@gmail.com> wrote: > Hi, > > I'd like to improv

FlinkML - Evaluate function should manage LabeledVector

2016-10-19 Thread Thomas FOURNIER
Hi, I'd like to improve SVM evaluate function so that it can use LabeledVector (and not only Vector). Indeed, what is done in test is the following (data is a DataSet[LabeledVector]): val test = data.map(l => (l.vector, l.label)) svm.evaluate(test) We would like to do: sm.evaluate(data) Adding