Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modeler parameter not being used (?) #68

Closed
echo66 opened this issue Oct 11, 2018 · 1 comment · Fixed by #80
Closed

Modeler parameter not being used (?) #68

echo66 opened this issue Oct 11, 2018 · 1 comment · Fixed by #80
Assignees
Labels
internal The issue doesn't change the API or functionality
Milestone

Comments

@echo66
Copy link

echo66 commented Oct 11, 2018

SDV version: 0.1.0
Python version: 3.6
Operating System: Fedora release 28 (Twenty Eight)

Description

I was trying to use the univariate KDE. To do that, I tried to set the distribution parameter in sdv.Modeler constructor to sdv.univariate.KDEUnivariate. The fitted modeler still uses sdv.univariate.GaussianUnivariate.

What I Did

I ran the following code:

import pandas as pd
import numpy as np

from copulas.univariate import KDEUnivariate
from copulas.univariate import GaussianUnivariate
from copulas.multivariate import VineCopula
from copulas.multivariate import GaussianMultivariate
from copulas.multivariate.tree import TreeTypes

from sdv import Sampler
from sdv import Modeler
from sdv import CSVDataLoader
from functools import partial


data_loader = CSVDataLoader('boston.json')
dn = data_loader.load_data()
dn.transform_data()
modeler = Modeler(dn, distribution=KDEUnivariate)
modeler.model_database()
sampler = Sampler(dn, modeler)

I checked the distribution for TAX feature and it follows, in the synthetic data, a gaussian distribution, while in the original data it wasn't gaussian. To check that, I looked into both the modeler and the following KDE plots:

image

image

If you want to run the code, you can use the annexed CSV and JSON files.

boston-data.zip

@ManuelAlvarezC ManuelAlvarezC self-assigned this Oct 17, 2018
@ManuelAlvarezC ManuelAlvarezC added the internal The issue doesn't change the API or functionality label Oct 17, 2018
@ManuelAlvarezC
Copy link
Contributor

Thanks for reporting @echo66. We will look at it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal The issue doesn't change the API or functionality
Projects
None yet
2 participants