svm_toolkit.rb 948 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. require 'confusion_matrix'
  2. require 'csv'
  3. require 'java'
  4. require 'libsvm'
  5. require 'PlotPackage'
  6. # Containing module for this library.
  7. #
  8. module SvmToolkit
  9. # import the required java classes - must do this before loading the ruby classes
  10. java_import 'libsvm.Parameter'
  11. java_import 'libsvm.Model'
  12. java_import 'libsvm.Problem'
  13. java_import 'libsvm.Node'
  14. java_import 'libsvm.Svm'
  15. java_import 'java.util.concurrent.ForkJoinPool'
  16. java_import 'java.util.concurrent.RecursiveTask'
  17. java_import 'jahuwaldt.plot.ContourPlot'
  18. java_import 'jahuwaldt.plot.DiamondSymbol'
  19. java_import 'jahuwaldt.plot.PlotDatum'
  20. java_import 'jahuwaldt.plot.PlotPanel'
  21. java_import 'jahuwaldt.plot.PlotRun'
  22. end
  23. # finally require the ruby code which extends the Java classes
  24. require 'svm_toolkit/evaluators'
  25. require 'svm_toolkit/model'
  26. require 'svm_toolkit/node'
  27. require 'svm_toolkit/parameter'
  28. require 'svm_toolkit/problem'
  29. require 'svm_toolkit/svm'