MCPcopy Create free account
hub / github.com/dmlc/treelite / SerializeModelParametersToJSON

Function SerializeModelParametersToJSON

src/json_serializer.cc:146–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144
145template <typename WriterType>
146void SerializeModelParametersToJSON(WriterType& writer, treelite::Model const& model) {
147 writer.Key("postprocessor");
148 WriteString(writer, model.postprocessor);
149 writer.Key("sigmoid_alpha");
150 writer.Double(model.sigmoid_alpha);
151 writer.Key("ratio_c");
152 writer.Double(model.ratio_c);
153 writer.Key("base_scores");
154 WriteArray(writer, model.base_scores);
155 writer.Key("attributes");
156 WriteString(writer, model.attributes);
157}
158
159} // anonymous namespace
160

Callers 1

DumpModelAsJSONFunction · 0.85

Calls 4

WriteStringFunction · 0.85
WriteArrayFunction · 0.85
KeyMethod · 0.45
DoubleMethod · 0.45

Tested by

no test coverage detected