Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

write model as byte array without using "write model operator" in process

siamak_wantsiamak_want Member Posts: 98 Contributor II
Hi Forum,

I want to write a clustering/classification model which is produced as the result of an RM process running in my own application. Using "write model" operator in the process, is not work for me, because "write model", writes the model in a given local path and I want to write it down as a byte[]. So I wrote the following code:

public static byte[]  RapidMinerModeltobytes(Model model) throws IOException{
 
byte[] buff;
buff = ((model.toString()).getBytes());
return buff;
}
I doubt that my way is the right way of doing this, so please help me if there is any idea...

any idea on this topic would be appreciated.

Answers

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    you could use:

    return IOObjectSerializer.getInstance().serializeToBuffer(model);
    Regards,
    Marco
Sign In or Register to comment.