loadModel

The CatBoost Java package provides different methods for loading CatBoost models.

Load the model from a stream

public static CatBoostModel loadModel(java.io.InputStream in)

Purpose

Load the CatBoost model from a stream.

Parameters

in

The input stream with the CatBoost model.

Returns

CatBoost model.

Throws

  • CatBoostError — When the attempt to load the model fails.

  • java.io.IOException — When the attempt to read the model fails.

Load the model from a file

public static CatBoostModel loadModel(String modelPath)

Purpose

Load the CatBoost model from a file.

Parameters

modelPath

The path to the input CatBoost model.

Returns

CatBoost model.

Throws

  • CatBoostError — When the attempt to load the model fails.

  • java.io.IOException — When the attempt to read the model fails.