pvdeg.montecarlo.simulate#
- pvdeg.montecarlo.simulate(func: Callable, correlated_samples: DataFrame, **function_kwargs) Series[source]#
Apply a target function to data to preform a monte carlo simulation.
If you get a key error and the target function has default parameters, try adding them to your
func_kwargsdictionary instead of using the default value from the target function.- Parameters:
func (function) – Function to apply for monte carlo simulation
correlated_samples (pd.DataFrame) – Dataframe of correlated samples with named columns for each appropriate modeling constant, can be generated using generateCorrelatedSamples()
function_kwargs (dict) – Keyword arguments to pass to func, only include arguments not named in your correlated_samples columns
- Returns:
res (pandas.Series) – Series with monte carlo results from target function