Last active
June 19, 2020 08:44
-
-
Save al102964/5420abded2814854b46952a4a9fcd2ab 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
# Importamos librerias | |
import numpy as np | |
import pandas as pd | |
#Definimos variables de prueba | |
# a = espacio lineal entre 0 y 50 + ruido con distribucion normal (mu=0, s2=1) | |
# b = espacio lineal entre -50 y 50 + ruido con distribucion normal (mu=0, s2=1) | |
# c = a^2 | |
# d = seno(a) | |
# e = b^3 | |
# health = variable categorica | |
a = np.linspace(0, 50, num=10000) + np.random.normal(0, 1, 10000) | |
b = np.linspace(-50,50,num=10000) + np.random.normal(0, 1, 10000) | |
c = b**2 | |
d = np.sin(a) | |
e = b**3 | |
h = ['healthy' for x in range(0,5000)]+['sick' for x in range(0,5000)] | |
# Definimos el dataframe | |
df = pd.DataFrame({'a':a,'b':b,'c':c,'d':d,'e':e,'f':f,'h':h}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment