lib/jrb-libsvm/model.rb
# Serialize model and return a string
Serialize model and return a string
Serialize model and return a string
def serialize
      stream = ByteArrayOutputStream.new
      do_stream = DataOutputStream.new(stream)
      Svm.svm_save_model(do_stream, self)
      stream.to_s
    rescue java.io.IOException
      raise IOError.new "Error in serializing SVM model"
    end
def serialize stream = ByteArrayOutputStream . new do_stream = DataOutputStream . new ( stream ) Svm . svm_save_model ( do_stream , self ) stream . to_s rescue java . io . IOException raise IOError . new "Error in serializing SVM model" end
Serialize model and return a string
Serialize model and return a string