add - template for encoding/decoding logistic model.
add - property to set params.