| 69 | } |
| 70 | |
| 71 | static TFullModel TrainModelOnPool(TDataProviderPtr pool, ETargetDimMode multiclass) { |
| 72 | TFullModel model; |
| 73 | TEvalResult evalResult; |
| 74 | NJson::TJsonValue params; |
| 75 | params.InsertValue("iterations", 5); |
| 76 | if (multiclass) { |
| 77 | params.InsertValue("loss_function", "MultiClass"); |
| 78 | } |
| 79 | TrainModel( |
| 80 | params, |
| 81 | nullptr, |
| 82 | Nothing(), |
| 83 | Nothing(), |
| 84 | Nothing(), |
| 85 | TDataProviders{pool, {pool}}, |
| 86 | /*initModel*/ Nothing(), |
| 87 | /*initLearnProgress*/ nullptr, |
| 88 | "", |
| 89 | &model, |
| 90 | {&evalResult}); |
| 91 | |
| 92 | return model; |
| 93 | } |
| 94 | |
| 95 | static TFullModel SaveLoadCBM(const TFullModel& trainedModel) { |
| 96 | TStringStream strStream; |
no test coverage detected