Load model from a file, stream or blob. Parameters ---------- fname : string Input file name.
(self, fname=None, format='cbm', stream=None, blob=None)
| 3743 | self._save_model(fname, format, export_parameters, pool) |
| 3744 | |
| 3745 | def load_model(self, fname=None, format='cbm', stream=None, blob=None): |
| 3746 | """ |
| 3747 | Load model from a file, stream or blob. |
| 3748 | |
| 3749 | Parameters |
| 3750 | ---------- |
| 3751 | fname : string |
| 3752 | Input file name. |
| 3753 | """ |
| 3754 | if (fname is None) + (stream is None) + (blob is None) != 2: |
| 3755 | raise CatBoostError("Only one of fname/stream/blob arguments should be specified") |
| 3756 | |
| 3757 | if fname is not None: |
| 3758 | self._load_model(fname, format) |
| 3759 | elif stream is not None: |
| 3760 | self._load_from_stream(stream) |
| 3761 | elif blob is not None: |
| 3762 | self._load_from_string(blob) |
| 3763 | return self |
| 3764 | |
| 3765 | def get_param(self, key): |
| 3766 | """ |