MCPcopy Create free account
hub / github.com/dmlc/xgboost / FeatureTypes

Function FeatureTypes

tests/cpp/common/test_quantile.h:141–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141inline 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
151inline std::vector<float> GenerateWeights(std::size_t rows, std::uint32_t seed) {
152 std::vector<float> weights(rows, 1.0f);

Callers 3

TEST_PFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected