Comments (6)
It depends on the meaning of the column.
If the column is a unique identifier, it should be removed.
If the column is an ordinal column, converting categories to integers may make sense. For example, ["elementary school", "middle school", "college"] --> [1, 2, 3] is reasonable. But ["Massachusetts", "New York", "California] --> [1, 2, 3] does not make much sense.
from ctgan.
When there’s a discrete column with so many categories, it usually means that there are fewer examples for each category. So the learning task becomes much more difficult. The solution to this problem depends on the data and use case. For example, when there're sufficient data, training multiple models on subsets of the data is helpful. It's also possible to cluster the categories. In your example, you can replace cities with states so that the number of categories becomes much smaller.
from ctgan.
Hi,
This could happen when a categorical column has too many categorical values. In the first 10k rows, there are say 1000 different categories, the model is still small and can fit into the GPU memory. When there are 100k rows, there could a possibility that there are more different categories and it runs out of memory. One typical example of such a column is unique id. Unique id columns are not supported by our model.
Is there a categorical column in your data that has a large set of catagorical values?
from ctgan.
Thank you! I had a few columns that had 20k unique and 300k unique categorical values. I am removing those now.
What about taking a high dimensionality categorical column then remapping it as an integer and running the model. Then the model will learn an integer (I can round it if it comes out as float) and try and remap back
e.g.
['A,'B',...,'Z'] --> [1,2,...26]
from ctgan.
from ctgan.
Closing this issue, as it seems all questions have been answered.
from ctgan.
Related Issues (20)
- TypeError while ctgan.fit() HOT 6
- Improve DataSampler efficiency
- ValueError: mismatch of shapes when sampling data for compas dataset HOT 2
- Return loss values as float values not PyTorch objects
- Transition from using setup.py to pyproject.toml to specify project metadata
- Remove bumpversion and use bump-my-version
- Switch to using ruff for Python linting and code formatting
- Add dependency checker
- Remove scikit-learn dependency
- CTGAN using deprecated 'sklearn' HOT 2
- Replace integration test that uses the iris demo data
- Add bandit workflow
- Feature Request: More verbose logging HOT 3
- Fix minimum version workflow when pointing to github branch
- Deployment requirements based on libtorch or ONNX HOT 4
- How to load this model directly to generate data after saving it HOT 4
- Cleanup automated PR workflows
- Remove FutureWarning: Setting an item of incompatible dtype is deprecated
- Only run unit and integration tests on oldest and latest python versions for macos
- [HELP] CTGAN has Reproducibility? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctgan.