This file contains hidden or 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
| import random ## to generate the items | |
| from pulp import * ## import pulp-or functions | |
| class MasterProblem: | |
| def __init__(self, maxValue, itemLengths, itemDemands, initialPatterns, problemname): | |
| self.maxValue=maxValue | |
| self.itemLengths=itemLengths |
This file contains hidden or 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 hidden or 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 hidden or 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
| clientid | income | age | loan | LTI | default10yr | |
|---|---|---|---|---|---|---|
| 1 | 66155.9250950813 | 59.0170150669292 | 8106.53213128514 | 0.122536751162261 | 0 | |
| 2 | 34415.1539658196 | 48.1171531048603 | 6564.74501767738 | 0.190751580661163 | 0 | |
| 3 | 57317.1700630337 | 63.108049491886 | 8020.95329638647 | 0.139939799671993 | 0 | |
| 4 | 42709.5342008397 | 45.7519723521546 | 6103.6422601407 | 0.142910532141104 | 0 | |
| 5 | 66952.6888453402 | 18.5843359269202 | 8770.09923520439 | 0.130989499995485 | 1 | |
| 6 | 24904.0641402826 | 57.4716071025468 | 15.4985984378272 | 0.000622332096099854 | 0 | |
| 7 | 48430.3596126847 | 26.8091324190609 | 5722.58198121271 | 0.118161046644673 | 0 | |
| 8 | 24500.1419843175 | 32.8975483207032 | 2971.00330971188 | 0.121264738449827 | 1 | |
| 9 | 40654.8925372772 | 55.4968525394797 | 4755.8252798016 | 0.116980392346159 | 0 |
This file contains hidden or 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 hidden or 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 <[email protected]> | |
| # Adapted for instructional purposes by Bart Smeets <[email protected]> | |
| import math | |
| import random |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
| } | |
| }, |
OlderNewer