| 139 | } |
| 140 | |
| 141 | inline std::vector<FeatureType> FeatureTypes(ContainerCase const& c) { |
| 142 | std::vector<FeatureType> ft(c.cols, FeatureType::kNumerical); |
| 143 | if (c.features == FeatureKind::kMixed) { |
| 144 | for (std::size_t i = 0; i < ft.size(); ++i) { |
| 145 | ft[i] = (i % 2 == 0) ? FeatureType::kNumerical : FeatureType::kCategorical; |
| 146 | } |
| 147 | } |
| 148 | return ft; |
| 149 | } |
| 150 | |
| 151 | inline std::vector<float> GenerateWeights(std::size_t rows, std::uint32_t seed) { |
| 152 | std::vector<float> weights(rows, 1.0f); |
no test coverage detected