Support for columns contains only numbers.#737
Closed
gszecsenyi wants to merge 1 commit intosdv-dev:mainfrom
Closed
Support for columns contains only numbers.#737gszecsenyi wants to merge 1 commit intosdv-dev:mainfrom
gszecsenyi wants to merge 1 commit intosdv-dev:mainfrom
Conversation
Contributor
|
Hello! Thanks for your interest in contributing to the SDV software. Before we are able to review or approve your code changes, we require that you read and sign our new Contributor License Agreement (CLA). To request a CLA, please fill out the required information in this form: https://bit.ly/sdv-cla-form Once we receive your submission, we'll get back to you with more details. Thanks, and let us know if you have any questions. |
Author
|
Thank you, I submitted my contact data. |
Author
|
Is there any update? :) |
Contributor
|
Hi @gszecsenyi this was resolved in sdv-dev/SDV#1976. This change is included in SDV version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the case where the column names contain only numbers, typically when scaling the data, the code doesn't work well because the first value of the variable will be a numeric value, not a string, to which you cannot append a string later.
The executed commands are:
synthesizer = SingleTablePreset(
metadata,
name='FAST_ML'
)
synthesizer.fit(
data=test_df
)
synthetic_data = synthesizer.sample(
num_rows=500
)
synthetic_data.head()
The output:
File [~/GitHub/ml_network_analysis_experiments/.venv/lib/python3.9/site-packages/rdt/transformers/base.py:367](https://file+.vscode-resource.vscode-cdn.net/Users/**********/GitHub/ml_network_analysis_experiments/~/GitHub/ml_network_analysis_experiments/.venv/lib/python3.9/site-packages/rdt/transformers/base.py:367), in BaseTransformer._set_seed(self, data) 365 hash_value = self.columns[0] 366 for value in data.head(5): --> 367 hash_value += str(value) 369 hash_value = int(hashlib.sha256(hash_value.encode('utf-8')).hexdigest(), 16) 370 self.random_seed = hash_value % ((2 ** 32) - 1) # maximum value for a seedThis is why this modifications are needed.
self.column_prefix = '#'.join(map(str, self.columns))and
hash_value = str(self.columns[0])