|
|
@ -39,10 +39,10 @@ The framework will depend on pandas and numpy (for now). Below is a basic sample
|
|
|
|
|
|
|
|
|
|
|
|
import numpy as np
|
|
|
|
import numpy as np
|
|
|
|
import pandas as pd
|
|
|
|
import pandas as pd
|
|
|
|
from pandas_risk import *
|
|
|
|
import risk
|
|
|
|
|
|
|
|
|
|
|
|
mydf = pd.DataFrame({"x":np.random.choice( np.random.randint(1,10),50),"y":np.random.choice( np.random.randint(1,10),50),"z":np.random.choice( np.random.randint(1,10),50),"r":np.random.choice( np.random.randint(1,10),50) })
|
|
|
|
mydf = pd.DataFrame({"x":np.random.choice( np.random.randint(1,10),50),"y":np.random.choice( np.random.randint(1,10),50),"z":np.random.choice( np.random.randint(1,10),50),"r":np.random.choice( np.random.randint(1,10),50) })
|
|
|
|
print mydf.risk.evaluate()
|
|
|
|
print (mydf.risk.evaluate())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -52,7 +52,7 @@ The framework will depend on pandas and numpy (for now). Below is a basic sample
|
|
|
|
# - Insure the fields are identical in both sample and population
|
|
|
|
# - Insure the fields are identical in both sample and population
|
|
|
|
#
|
|
|
|
#
|
|
|
|
pop = pd.DataFrame({"x":np.random.choice( np.random.randint(1,10),150),"y":np.random.choice( np.random.randint(1,10),150) ,"z":np.random.choice( np.random.randint(1,10),150),"r":np.random.choice( np.random.randint(1,10),150)})
|
|
|
|
pop = pd.DataFrame({"x":np.random.choice( np.random.randint(1,10),150),"y":np.random.choice( np.random.randint(1,10),150) ,"z":np.random.choice( np.random.randint(1,10),150),"r":np.random.choice( np.random.randint(1,10),150)})
|
|
|
|
mydf.risk.evaluate(pop=pop)
|
|
|
|
print (mydf.risk.evaluate(pop=pop))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@TODO:
|
|
|
|
@TODO:
|
|
|
|