gradient_boosting_model_read
Retrieves a gradient boosting model previously filed using imsls_f_gradient_boosting_model_write.
Synopsis
#include <imsls.h>
Imsls_f_gradient_boosting_model *imsls_f_gradient_boosting_model_read (char *filename, …, 0)
The type double function is imsls_d_gradient_boosting_model_read.
Required Arguments
char *filename (Input)
The name of an ASCII file containing a gradient boosting model previously saved using imsls_f_gradient_boosting_model_write. A full or relative path can be given. If the optional argument IMSLS_FILE is used, filename is ignored.
Return Value
A pointer to an Imsls_f_gradient_boosting_model data structure containing a gradient boosting model previously stored using imsls_f_gradient_boosting_model_write. If no model can be read, NULL is returned.
Synopsis with Optional Arguments
#include <imsls.h>
Imsls_f_gradient_boosting_model *imsls_f_gradient_boosting_model_read (char *filename,
IMSLS_PRINT,
IMSLS_FILE, FILE *file,
0)
Optional Arguments
IMSLS_PRINT
Prints status of file opening, reading and closing.
Default: No printing.
IMSLS_FILE, FILE *file (Input)
A FILE pointer to a file opened for reading. This file is read but not closed. If this option is provided, filename is ignored. This argument allows users to read additional user-defined data and multiple classifiers from the same file. To ensure the file is opened and closed with the same C run-time library used by the product, open and close this file using imsls_fopen and imsls_fclose.
Description
Function gradient_boosting_model_read reads a gradient boosting model from an ASCII file previously stored using imsls_f_gradient_boosting_model_write and returns a gradient boosting model in the form of an Imsls_f_gradient_boosting_model data structure. If the optional argument IMSLS_FILE is provided, a model is read from the file and returned without closing the file. If this argument is not provided, imsls_f_gradient_boosting_model_read opens the file using the path and name provided in filename, reads the model then closes the file and returns the data structure.
Examples
See Example 2 of imsls_f_gradient_boosting_predict.
Fatal Errors
IMSLS_FILE_OPEN_FAILURE |
Unable to open # file for reading model. |