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
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
class Node: | |
def __init__(self,value,point): | |
self.value = value | |
self.point = point | |
self.parent = None | |
self.H = 0 | |
self.G = 0 | |
def move_cost(self,other): | |
return 0 if self.value == '.' else 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
lm_model <- lm(preds ~ ., data = data) | |
my_AIC <- AIC(lm_model) | |
my_AIC <- nrow(data) * (log(2 * pi) + 1 + log((sum(lm_model$residuals ^ 2) / nrow(data)))) + ((length(lm_model$coefficients) + 1) * 2) | |
my_BIC <- AIC(lm_model, k = log(nrow(data))) | |
my_BIC <- nrow(data) * (log(2 * pi) + 1 + log((sum(lm_model$residuals ^ 2) / nrow(data)))) + ((length(lm_model$coefficients) + 1) * log(nrow(data))) |