This file contains 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
####### load required packages and ste seed ######## | |
library(mc2d) #for PERT distribution | |
library(ggplot2) #for plotting | |
set.seed(1501) | |
DDoS <- 10 #Number of DDoS attacks per year | |
software_cost <- 100000 #Cost of new technology | |
DDoS_new <- runif(n=1000,min=3,max=6) #Num of attacks after investment | |
downtime_min <- 2 |
This file contains 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
def dot_product(x, kernel): | |
""" | |
Wrapper for dot product operation, in order to be compatible with both | |
Theano and Tensorflow | |
Args: | |
x (): input | |
kernel (): weights | |
Returns: | |
""" | |
if K.backend() == 'tensorflow': |