huawei-noah / streamDM

Stream Data Mining Library for Spark Streaming
http://streamdm.noahlab.com.hk/
Apache License 2.0
492 stars 147 forks source link

Add Bagging #10

Closed abifet closed 9 years ago

JianfengQian commented 9 years ago

Hi albert. what is convertInstance function used for? Another question is what about the original weight if it is not 1 as default? //Online Sampling with replacement def convertInstance(example: Example): Example = { val weight = Utils.poisson(1.0, classifierRandom); new Example(example.in, example.out, weight) }

abifet commented 9 years ago

I renamed convertInstance to onlineSampling, and I changed the weight of the new example, so that it multiplies the previous weight of the example.

abifet commented 9 years ago

Fixed!

JianfengQian commented 9 years ago

+1

smaniu commented 9 years ago

:+1: