Last active
May 18, 2020 11:37
-
-
Save pierrelouisbescond/68748aadb6fc25d72c27a40c54eeb33a to your computer and use it in GitHub Desktop.
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
import pandas as pd | |
import numpy as np | |
import time | |
from sklearn.datasets import make_regression | |
n_samples = 1000 | |
n_features = 10 | |
n_informative = 3 | |
X, y = make_regression(n_samples=n_samples, n_features=n_features, n_informative=n_informative) | |
# We convert the X and y arrays into a DataFrame which will be useful later | |
col_names = [] | |
for i in range(n_features): | |
col_names.append("X{}".format(i+1)) | |
df = pd.DataFrame(X, columns=col_names) | |
df["Y"] = y | |
display(df) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment