Models
Contains all possible time and cost regression models for GPU and non-GPU hardware instances
- module models
- class GPUModel
Finds best fit time/cost model as a function of hardware for GPU instances.
Public Functions
- __init__(self, x, y)
GPUModel Constructor.
- Parameters:
x – Hardware Data
y – Time, Cost, or Objective Cost
- regression(self, model, coeff_len)
Performs regression based on model type.
- Parameters:
model – Regression Model Type
coeff_len – Number of coefficients required for this regression model
- Returns:
Tuple containing R^2 and coefficients of given model
- const_model(self, x, *coefficients, predict=False, single=False)
Constant Regression Model.
- Returns:
Model Outputs
- linear_model(self, x, *coefficients, predict=False, single=False)
Linear Regression Model.
- Returns:
Model Outputs
- log_model(self, x, *coefficients, predict=False, single=False)
Log Regression Model.
- Returns:
Model Outputs
- exp_model(self, x, *coefficients, predict=False, single=False)
Exponential Regression Model.
- Returns:
Model Outputs
Public Members
- x_
Hardware Data.
- y_
Time, Cost, or Objective Cost.
- r_squared_threshold_
Minimum r^2 for best fit model (if it is below, then we say the correlation isn’t strong enough)
- max_rsquared_
R^2 for best fit model.
- model_
Best fit model.
- is_const_model_
Const model boolean is true if the best fit model doesn’t have a strong enough correlation.
- class Model
Finds best fit time/cost model as a function of hardware for non-GPU instances.
Public Functions
- __init__(self, x, y)
Model Constructor.
- Parameters:
x – Hardware Data
y – Time, Cost, or Objective Cost
- regression(self, model, coeff_len)
Performs regression based on model type.
- Parameters:
model – Regression Model Type
coeff_len – Number of coefficients required for this regression model
- Returns:
Tuple containing R^2 and coefficients of given model
- linear_linear_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is linear and Memory is linear.
- linear_log_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is linear and Memory is log.
- linear_exp_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is linear and Memory is exponential.
- linear_power_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is linear and Memory is power.
- linear_hyper_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is linear and Memory is hyperbolic.
- log_linear_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is log and Memory is linear.
- log_log_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is log and Memory is log.
- log_exp_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is log and Memory is exponential.
- log_power_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is log and Memory is power.
- log_hyper_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is log and Memory is hyper.
- exp_linear_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is exponential and Memory is linear.
- exp_log_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is exponential and Memory is log.
- exp_exp_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is exponential and Memory is exponential.
- exp_power_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is exponential and Memory is power.
- exp_hyper_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is exponential and Memory is hyperbolic.
- power_linear_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is power and Memory is linear.
- power_log_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is power and Memory is log.
- power_exp_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is power and Memory is exponential.
- power_power_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is power and Memory is power.
- power_hyper_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is power and Memory is hyperbolic.
- hyper_linear_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is hyperbolic and Memory is linear.
- hyper_log_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is hyperbolic and Memory is log.
- hyper_exp_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is hyperbolic and Memory is exponential.
- hyper_power_model(self, x, *coefficients, predict=False, single=False)
Model where CPU is hyperbolic and Memory is power.