(train_pool, train_pool_copy, test_pool, params)
| 8793 | |
| 8794 | |
| 8795 | def check_save_quantized_pool(train_pool, train_pool_copy, test_pool, params): |
| 8796 | feature_names = train_pool.get_feature_names() |
| 8797 | |
| 8798 | train_quantized_pool = train_pool_copy |
| 8799 | train_quantized_pool.quantize() |
| 8800 | |
| 8801 | assert (train_quantized_pool.is_quantized()) |
| 8802 | |
| 8803 | train_quantized_pool.save(OUTPUT_QUANTIZED_POOL_PATH) |
| 8804 | |
| 8805 | train_quantized_load_pool = Pool(get_quantized_path(OUTPUT_QUANTIZED_POOL_PATH)) |
| 8806 | |
| 8807 | model = CatBoost(params=params) |
| 8808 | model_fitted_with_load_quantized_pool = CatBoost(params=params) |
| 8809 | |
| 8810 | model.fit(train_pool) |
| 8811 | predictions1 = model.predict(test_pool) |
| 8812 | |
| 8813 | model_fitted_with_load_quantized_pool.fit(train_quantized_load_pool) |
| 8814 | predictions2 = model_fitted_with_load_quantized_pool.predict(test_pool) |
| 8815 | |
| 8816 | loaded_feature_names = train_quantized_load_pool.get_feature_names() |
| 8817 | assert (feature_names == loaded_feature_names) |
| 8818 | assert all(predictions1 == predictions2) |
| 8819 | |
| 8820 | |
| 8821 | FEATURES_TYPES = ['num', 'cat', 'num_and_cat'] |
no test coverage detected