Giter Site home page Giter Site logo

phenoflex_toyproblem's Introduction

An example of the current fitting routine using PhenoFlex

This is an example with flowering data of apple cultivar “Blanquina” for the period 1987 - 1997 and 2004 - 2020 in Asturias, Spain. Hourly weather data were generated from daily temperature observations using the chillR function stack_hourly_temps(). Phenology and temperature data can be found in the “data” folder.

In the “code”, folder you can find a script called “example_fit.R”. It contains the usual routine we use to prepare the data and then carry out the first (out of usually more than 10) round of fitting using the function phenologyFitter() from the chillR package. The function requires several arguments:

  • par.guess contains the initial guess for the parameters. The order should be (yc, zc, s1, Tu, E0, E1, A0, A1, Tf, Tc, Tb, slope).
  • modelfn is the wrapper function for the phenoflex model. It can also be customised, so that some parameters are for example kept constant.
  • bloomJDays is a vector of the Julian days of the flowering.
  • SeasonList is a list with the hourly temperature data organized in the same order as the provided phenology data.
  • lower contains the lower bounds of the model parameters.
  • upper contains the upper bounds of the model parameters.
  • seed to make results reproducible.
  • control is a list of further variables directly passed to the simulation annealing function currently used in phenoflex (GenSA::GenSA()). Most interesting is “maxit” which defines the maximum number of iterations. “max.time” could be also of interest, because it specifies the time the optimizer should run in seconds, which can be used instead of “max.it”

The fitting result is checked on RMSE. The temperature response curve resulting from the new set of parameters is inspected using some helper functions, which you can find in the file “helper_functions.R”.

phenoflex_toyproblem's People

Contributors

eduardofernandezc avatar larscaspersen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.