Forecasts monthly mean CVSS scores of subsets of CWE vulnerabilities.
All private attribute's have NA
as default value.
cwes the character
vector of available CWEs
cwes_ts monthly time series of mean monthly CVSS scores of the CWEs in private attribute cwes
start_year the first year of a time period
end_year the last year of a time period
end_month the last month of a time period
benchmark the attribute for holding a list of BenchmarkModel objects
arima the attribute for holding a list of ARIMAModel objects
ets the attribute for holding a list of ETSModel objects
tslinear the attribute for holding a list of TSLinearModel objects
nnar the attribute for holding a list of NNARModel objects
arfima the attribute for holding a list of ARFIMAModel objects
bagged_ets the attribute for holding a list of BaggedETSModel objects
tbats the attribute for holding a list of TBATSModel objects
struct_ts the attribute for holding a list of StructTSModel objects
best_model_list the attribute for holding a list of forecasting model objects which gave the best overall forecast accuracy results for specific CWEs
new() creates new CVSSForecaster object
getCWENames() returns private attribute cwes
getSeries() returns private attribute cwes_ts
getBenchmark(cwe_name) returns private attribute benchmark
when the argument cwe_name
is missing; otherwise returns a BenchmarkModel object (from benchmark
) corresponding to cwe_name
value (CWE ID)
getARIMA(cwe_name) returns private attribute arima
when the argument cwe_name
is missing; otherwise returns a ARIMAModel object (from arima
) corresponding to cwe_name
value (CWE ID)
getETS(cwe_name) returns private attribute ets
when the argument cwe_name
is missing; otherwise returns a ETSModel object (from ets
) corresponding to cwe_name
value (CWE ID)
getTSLinear(cwe_name) returns private attribute tslinear
when the argument cwe_name
is missing; otherwise returns a TSLinearModel object (from tslinear
) corresponding to cwe_name
value (CWE ID)
getNNAR(cwe_name) returns private attribute nnar
when the argument cwe_name
is missing; otherwise returns a NNARModel object (from nnar
) corresponding to cwe_name
value (CWE ID)
getARFIMA(cwe_name) returns private attribute arfima
when the argument cwe_name
is missing; otherwise returns a ARFIMAModel object (from arfima
) corresponding to cwe_name
value (CWE ID)
getBaggedETS(cwe_name) returns private attribute bagged_ets
when the argument cwe_name
is missing; otherwise returns a BaggedETSModel object (from bagged_ets
) corresponding to cwe_name
value (CWE ID)
getTBATS(cwe_name) returns private attribute tbats
when the argument cwe_name
is missing; otherwise returns a TBATSModel object (from tbats
) corresponding to cwe_name
value (CWE ID)
getStructTS(cwe_name) returns private attribute struct_ts
when the argument cwe_name
is missing; otherwise returns a StructTSModel object (from struct_ts
) corresponding to cwe_name
value (CWE ID)
getPlots(model_list, row_no = 5, col_no = 2) returns plots of objects in the model_list
with row_no
number of rows and col_no
number of columns arranged by marrangeGrob
getAssessments(model_list) returns a data.table with columns cwe
, method
, MAE
, RMSE
, MAPE
and MASE
extracted from the list of models from model_list
getAllAssessments() returns a data.table with columns cwe
, method
, MAE
, RMSE
, MAPE
and MASE
extracted from the models that the CVSSForecaster
has built and stored in its private attributes.
getBestModelList() returns private attribute best_model_list
getBestAssessments() returns a data.table with columns cwe
, method
, MAE
, RMSE
, MAPE
and MASE
extracted from a subset of models returned by getAllAssessments()
; subset represents the models which have the biggest number of lowest MAE, RMSE, MAPE and MASE values for a given CWE
useBest(fcast_period, arima_stepwise = F, arima_approx = F, nnar_pi_sim = T) returns a list of lists, where each list has two elements: CWE ID and the forecasts fcast_period
-step ahead into the future as a "forecast
" object generated by the same type of model that generated previously the most accurate forecasts according to CVSSForecaster's method getBestAssessments
plotUseBest(bestInUse, row_no, col_no, compact = F, actual) returns plots of objects in the bestInUse
object previously generated by CVSSForecaster's method useBest
with row_no
number of rows and col_no
number of columns; argument compact = T
removes details from plots; when argument actual
is not missing, then the actual values are added as a red line to the plot (should be the time series output of CWE object's method getTimeSeriesData
)
assessUseBest(bestInUse, actual) returns a data.table with columns cwe
, method
, MAE
, RMSE
, MAPE
and MASE
where the forecast accuracy numbers are calculated by using the forecasting output by CVSSForecaster's method useBest
and the time series of actual values in a form given by CWE object's method getTimeSeriesData
); example: CVSSForecaster's method useBest
generated forecasts for 2018 based on the available data from 2013 to 2017, which was eventually checked when 2018 data became available
setBenchmark(destroy = F) builds and assesses BenchmarkModel and assigns the result to the private attribute benchmark
; if destroy = F
then sets NA
as the value of private attribute benchmark
setARIMA(stepwise = T, approximation = T, destroy = F) builds and assesses ARIMAModel and assigns the result to the private attribute arima
; the arguments stepwise
and approximation
are passed eventually to forecast::auto.arima; if destroy = F
then sets NA
as the value of private attribute arima
setETS(destroy = F) builds and assesses ETSModel and assigns the result to the private attribute ets
; if destroy = F
then sets NA
as the value of private attribute ets
setTSLinear(destroy = F) builds and assesses TSLinearModel and assigns the result to the private attribute tslinear
; if destroy = F
then sets NA
as the value of private attribute tslinear
setNNAR(pi_simulation = F, destroy = F) builds and assesses NNARModel and assigns the result to the private attribute nnar
; the value of the argument pi_simulation
is passed eventually to nnetar as the value of that method's argument PI
; if destroy = F
then sets NA
as the value of private attribute nnar
setARFIMA(destroy = F) builds and assesses ARFIMAModel and assigns the result to the private attribute arfima
; if destroy = F
then sets NA
as the value of private attribute arfima
setBaggedETS(destroy = F) builds and assesses BaggedETSModel and assigns the result to the private attribute bagged_ets
; if destroy = F
then sets NA
as the value of private attribute bagged_ets
setTBATS(destroy = F) builds and assesses TBATSModel and assigns the result to the private attribute tbats
; if destroy = F
then sets NA
as the value of private attribute tbats
setStructTS(destroy = F) builds and assesses StructTSModel and assigns the result to the private attribute tbats
; if destroy = F
then sets NA
as the value of private attribute struct_ts
setCWEs(cwe_input) extracts start year, end year, end month, time series data and CWE IDs from argument cwe_input
of class CWE; gives values to private attributes start_year
, end_year
, cwes
, cwes_ts
and end_month
setBestModelList() finds the model objects corresponding to CVSSForecaster
's method getBestAssessments
output and assings the list of these objects to be the value of the private attribute best_model_list