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
mpg_fit<- | |
readRDS("mpg_fit.Rdata") | |
predict_mpg<-function(disp, wt, hp){ | |
new_data<-data.frame(disp=as.numeric(disp), | |
wt=as.numeric(wt), | |
hp=as.numeric(hp)) | |
predict(mpg_fit, newdata = new_data) | |
} |
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
library(randomForest) | |
mpg_fit<- | |
randomForest(mpg~disp+wt+hp, mtcars) | |
saveRDS(mpg_fit, "mpg_fit.Rdata") |
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
Variable | Unit | Country | Year | Value | Flags | |
---|---|---|---|---|---|---|
Total hospital beds | Number | Australia | 1960 | 99191 | ||
Total hospital beds | Number | Australia | 1961 | 99670 | ||
Total hospital beds | Number | Australia | 1962 | 100413 | ||
Total hospital beds | Number | Australia | 1963 | 102109 | ||
Total hospital beds | Number | Australia | 1964 | 102618 | ||
Total hospital beds | Number | Australia | 1965 | 103580 | ||
Total hospital beds | Number | Australia | 1966 | 103636 | ||
Total hospital beds | Number | Australia | 1967 | 104262 | ||
Total hospital beds | Number | Australia | 1968 | 103397 |
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
Evolution hospital beds, resources and consumption | |
======================================================== | |
```{r setup, echo=FALSE, message=FALSE, warning=FALSE} | |
imgur_insecure<-function (file, key = "75ace4c8e871b86") | |
{ | |
if (!is.character(key)) | |
stop("The Imgur API Key must be a character string!") | |
res = RCurl::postForm("https://api.imgur.com/3/image.xml", | |
image = RCurl::fileUpload(file), .opts = RCurl::curlOptions(httpheader = c(Authorization = paste("Client-ID", | |
key)),ssl.verifypeer = FALSE)) |
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
{ | |
"env": { | |
"resources": { | |
"nurse": { | |
"capacity": 1 | |
}, | |
"doctor": { | |
"capacity": 1 | |
} | |
}, |
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
{ | |
"env": { | |
"resources": { | |
"nurse": { | |
"capacity": 1 | |
}, | |
"doctor": { | |
"capacity": 1 | |
} | |
}, |
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
library(lpSolveAPI) | |
#used for result visualization | |
library(ggplot2) | |
library(reshape) | |
library(gridExtra) | |
#define the datasets | |
train<-data.frame(wagon=c('w1','w2','w3'), weightcapacity=c(10,8,12), spacecapacity=c(5000,4000,8000)) |
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
library(R6) | |
library(simmer) | |
BatchGate <- R6Class("BatchGate", | |
public = list( | |
queue_length = 0, | |
opens_at_length = NA, | |
open = FALSE, | |
allowed_to_pass = 0, | |
initialize = function(opens_at_length){ |
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
# Back-Propagation Neural Networks | |
# | |
# Written in Python. See http://www.python.org/ | |
# Placed in the public domain. | |
# Neil Schemenauer <nas@arctrix.com> | |
# Adapted for instructional purposes by Bart Smeets <bartsmeets86@gmail.com> | |
import math | |
import random |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer