I would like to generate a training and test set for the binary classification problem. I want the instances to be generated from a multivariate normal distribution and have 5 features. Can someone explain how to do this in python?
This can be done by using inverse transformation theorem
import numpy as np import pandas as pd from sklearn.datasets import make_classification from sklearn.preprocessing import QuantileTransformer def make_gausssians_binary_classification(n_samples= 1000, n_features= 5, n_informative= 5, n_redundant= 0, random_state= 42 ): X, y = make_classification(n_samples= n_samples, n_features= n_features, n_informative= n_informative, n_redundant= n_redundant, random_state= random_state) transformation = QuantileTransformer(output_distribution= "normal").fit(X) X_normal = transformation.transform(X) return X_normal, y X, y = make_gausssians_binary_classification(n_samples=10000)