zhengruifeng commented on issue #26735: [SPARK-30102][WIP][ML][PYSPARK] GMM supports instance weighting URL: https://github.com/apache/spark/pull/26735#issuecomment-563046402 > I don't suppose there's any clean way to avoid the added computation for weights when the weights are all 1? looks hard. I'm OK with it An approach is to have two method: 1, def add(instance: Vector, weight: Double): this.type = { if(weight==1) add(instance) else ... } 2, def add(instance: Vector): this.type the second method do not include any extra multiplication.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
