🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

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

User: "siamak_want"
New Altair Community Member
Updated by Jocelyn
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.

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Marco_Boeck"
    New Altair Community Member
    Hi,

    you could use:

    return IOObjectSerializer.getInstance().serializeToBuffer(model);
    Regards,
    Marco