Git Product home page Git Product logo

Comments (3)

andrey-khropov avatar andrey-khropov commented on May 25, 2024

After checking the source code, I found that the error was reported because featureIndex.FeatureIdx <= 0xffff.

It is exactly the opposite. The condition featureIndex.FeatureIdx <= 0xfff is checked and if it is false then error is reported.

Finally, could you please help me explain what the featureIndex.FeatureIdx field means? Thank you.

You can see it in the code in model.cpp.

Basically all different binary splits in the trees in the trained model are grouped into "features". Features correspond to real features (including implicitly derived features from original categorical, text and embedding features) if the number of splits for a particular feature is less than MAX_VALUES_PER_BIN (which is 254 ), otherwise original features are split into subfeatures with at most MAX_VALUES_PER_BIN splits for each subfeature.

I suspect that the issue here is that too many derived features from categorical features are implicitly generated and used during the training.

Do you have categorical features, and if the answer is positive - how many? How many distinct values (categories) do they have?

from catboost.

yuzumei avatar yuzumei commented on May 25, 2024

After checking the source code, I found that the error was reported because featureIndex.FeatureIdx <= 0xffff.

It is exactly the opposite. The condition featureIndex.FeatureIdx <= 0xfff is checked and if it is false then error is reported.

Finally, could you please help me explain what the featureIndex.FeatureIdx field means? Thank you.

You can see it in the code in model.cpp.

Basically all different binary splits in the trees in the trained model are grouped into "features". Features correspond to real features (including implicitly derived features from original categorical, text and embedding features) if the number of splits for a particular feature is less than MAX_VALUES_PER_BIN (which is 254 ), otherwise original features are split into subfeatures with at most MAX_VALUES_PER_BIN splits for each subfeature.

I suspect that the issue here is that too many derived features from categorical features are implicitly generated and used during the training.

Do you have categorical features, and if the answer is positive - how many? How many distinct values (categories) do they have?

I have almost 900 categorical features,There are generally 2 to 30 different values ​​for each feature, and no more than 300 at most.I checked some previous issues and found that reducing max_ctr_complexity can solve this problem, but this will greatly affect the accuracy of the model.
What I want to know is whether this featureIndex.FeatureIdx is fixed before the model training starts, or will it continue to increase as the model is trained? Can I set it to stop training when it exceeds 0xffff during model training? Otherwise, it will waste a lot of time (because the error will not be reported until the model training is completed)

from catboost.

ek-ak avatar ek-ak commented on May 25, 2024

Hello!
or will it continue to increase as the model is trained - yes. A new counter feature can be generated for each new split https://catboost.ai/en/docs/concepts/algorithm-main-stages_cat-to-numberic
You can you use model-size-reg option to decrease number of resulting features, it should solve your problem.

from catboost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.