Comments (4)
and how can I save the learned model?
You can do so using PyTorch save and load
For this, after fitting your model, you save it using:
import torch
torch.save(synthesizer, '/path/to/your/model.pkl')
And later on load it doing:
import torch
synthesizer = torch.load('/path/to/your/model.pkl')
from sdgym.
Thank you very much for your quick answer.
If you have time later, I think it will be helpful if you make a brief example of other frameworks such as Tensorflow and Keras.
Oh, I have one question about TGAN paper.
In the paper, there is a way to deal with category missing value variables, and I think it's right to do so.
But if there's no explanation in the paper about a numerical variable that can't be substituted for missing values, is there any way you can recommend it?
from sdgym.
Hello @sungreong
I'm not entirely sure about understanding you properly, but if you mean whether it is possible to use the benchmarking tool for tensorflow based synthesizers, yes, it is possible.
All you need to do is prepare your synthesizer function following the specification and pass it to the benchmark function:
from sdgym import benchmark
from your_package import your_tensorflow_synthesizer
def your_synthesizer_function(real_data, categorical_columns, ordinal_columns):
# put the code here to use your_tensorflow_synthesizer to model and sample data
return sampled_data
benchmark(your_synthesizer_function)
Please, let me know if this is what you were looking for.
from sdgym.
This question has already been answered here, so I'm closing this issue for now.
from sdgym.
Related Issues (20)
- timeout parameter causes sdgym to crash
- Can't download datasets if `.aws` config is present
- ImportError: cannot import name 'Metadata' from 'sdv' HOT 2
- (Known issue, workaround provided) Problems with importing SDGym HOT 1
- The `UniformSynthesizer` should follow the sdtypes in metadata (not the data's dtypes)
- The `IndependentSynthesizer` should follow the sdtypes in the metadata (not the data's dtypes)
- Add support for Python 3.11
- Remove anyio usage
- load_dataset fails for HOT 4
- Drop support for Python 3.7
- Switch default branch from master to main HOT 1
- Binary Classification metric fails with unknown category (`ValueError`) HOT 2
- Add ability to load and inspect individual datasets HOT 1
- Dockerfile error HOT 1
- Fix typos in the docs HOT 1
- Add run_on_ec2 flag to benchmark_single_table
- 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 'pytest-runner>=2.11.1' dependency
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 sdgym.