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
if (newSize == 0) { | |
key = null; | |
value = null; | |
return false; | |
} else { | |
return true; | |
} |
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
while (getFilePosition() <= end || in.needAdditionalRecordAfterSplit()) { | |
try { | |
if (pos == 0) { | |
newSize = skipUtfByteOrderMark(); | |
} else { | |
newSize = in.readLine(value, maxLineLength, maxBytesToConsume(pos)); | |
pos += newSize; | |
} | |
if ((newSize == 0) || (newSize < maxLineLength)) { |
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
while (getFilePosition() <= end || in.needAdditionalRecordAfterSplit()) { | |
if (pos == 0) { | |
newSize = skipUtfByteOrderMark(); | |
} else { | |
newSize = in.readLine(value, maxLineLength, maxBytesToConsume(pos)); | |
pos += newSize; | |
} | |
if ((newSize == 0) || (newSize < maxLineLength)) { | |
break; |
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
try { | |
if (start != 0) { | |
start += in.readLine(new Text(), 0, maxBytesToConsume(start)); | |
} | |
} catch (IOException e) { | |
fileBroken = true; | |
LOG.warn("Problem reading file " + this.splitName + " - " + e.getMessage()); | |
} finally { | |
this.pos = start; | |
} |
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
if (start != 0) { | |
start += in.readLine(new Text(), 0, maxBytesToConsume(start)); | |
} | |
this.pos = start; |
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
fileBroken = false; | |
FileSplit split = (FileSplit) genericSplit; | |
this.splitName = split.getPath().toString(); | |
if (split.getLength() == 0) { | |
fileBroken = true; | |
LOG.warn("Problem reading file " + this.splitName + " - Zero-length file."); | |
} |
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
fit <- survfit(survival ~ 1, data = ch) | |
plot(fit, mark.time = FALSE, col = c('red', 'blue'), xlab = 'Days Since Subscribing', ylab = '% Experiencing Event') | |
title('Cumulative Incidence of 2 Hazards') | |
legend(x = 0, y = .2, col = c('red', 'blue'), legend = c('Churn', 'Upgrade'), lty = c(1, 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
ch$survival <- Surv(ch$time, ch$event * ch$type, type = 'mstate') |
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(survival) | |
ch <- read.csv("C:/Users/dbatten/Desktop/competing_risks.csv") |
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
proc optmodel; | |
num num_patterns init 0; | |
set PATTERNS = 1..num_patterns; | |
set cuts; | |
number choices {patterns, cuts}; | |
number prices {patterns}; | |
number lumber {patterns}; | |
number targets {cuts}; | |
number length {cuts}; | |
read data cuts into cuts=[_n_] targets=number length; |