Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add partial fit for covid-19 #3

Open
turgut090 opened this issue Jun 3, 2021 · 0 comments
Open

Add partial fit for covid-19 #3

turgut090 opened this issue Jun 3, 2021 · 0 comments

Comments

@turgut090
Copy link
Member

library(prophet)

df=read.csv('https://raw.githubusercontent.com/facebook/prophet/master/examples/example_wp_log_peyton_manning.csv')
m <- prophet(df,algorithm='LBFGS')
m$params


init_stan2 = function(){
  kmsig = as.list(vector(mode = 'numeric',3))
  names_=c('k','m','sigma_obs')
  names(kmsig)<-names_
  
  for (i in 1:length(kmsig)) {
    kmsig[[i]] <-m$params[[names_[i]]]
  }
  print('Done kmsigma')
  
  matrices_ = list(matrix(),matrix())
  names_2=c('delta','beta')
  names(matrices_)<-names_2
  
  for (i in 1:length(matrices_)) {
    matrices_[[i]] <-m$params[[names_2[i]]]
  }
  print('Done delta beta')
  
  
}

m2 = prophet(df, init=init_stan2, algorithm='LBFGS')



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant