paulgoetze / weka-jruby

Machine Learning & Data Mining with JRuby
MIT License
65 stars 8 forks source link

Add a #merge method to Weka::Core::Instances #4

Closed paulgoetze closed 8 years ago

paulgoetze commented 8 years ago

From the Java Weka lib it is possible to merge multiple weka.core.Instances with

Instances merged = Instance.merge _instances(instancesA, instancesB);

Instead of doing this:

merged = Weka::Core::Instances.merge_instances(instances, other_instances)

a much nicer Ruby interface to do the same would be:

merged = instances.merge(other_instances)

# and for merging multiple instances:
merged = instances.merge(other_instances, yet_another_instances)