-
Notifications
You must be signed in to change notification settings - Fork 13
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
Errors fitting GPS data version 0.4.0 #15
Comments
Hi Iain, Hmm, you did find a wee bug in the
Thanks for pointing this out. Cheers, Ian |
Hi Ian,
Thank you
However I now get the error message
fit_ssm(gps,vmax = 3,model = "crw",time.step = 10)
pre-filtering data...
fitting SSM...
Error in optim(par = c(logD = 0, l_rho_o = 0), fn = function (x = last.par[-random], :
L-BFGS-B needs finite values of 'fn'
Error in optimHess(par.fixed, obj$fn, obj$gr) :
gradient in optim evaluated to length 1 not 2
# A tibble: 1 x 3
id ssm converged
<chr> <list> <lgl>
1 W8257 <ssm> FALSE
Cheers
Iain
Full run:
-- Attaching packages --------------------------------------- tidyverse 1.3.0 --
v ggplot2 3.2.1 v purrr 0.3.3
v tibble 2.1.3 v dplyr 0.8.3
v tidyr 1.0.0 v stringr 1.4.0
v readr 1.3.1 v forcats 0.4.0
-- Conflicts ------------------------------------------ tidyverse_conflicts() --
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
library(foieGras)
#vignette("foiegras-basics")
#C:\Users\ijst\OneDrive - NERC\GPS data\2005-2006
path_to_file <- "C:\\Users\\ijst\\OneDrive - NERC\\GPS data\\2011-2012\\"
gps <- read_csv(file=paste0(path_to_file,"W8257_140112.csv"))
Parsed with column specification:
cols(
Date = col_character(),
Time = col_time(format = ""),
`No of satellites used` = col_double(),
Latitude = col_double(),
Longitude = col_double(),
Altitude = col_double(),
`Clock offset` = col_double(),
`Accuracy indicator` = col_double(),
`Battery indicator` = col_double()
)
#Date Time No satellites used Latitude Longitude Altitude Clock offset Accuracy indicator Battery voltage
#join date and time together
gps <- gps %>% mutate(date = as.POSIXct(strptime(paste(Date,Time),format = "%d/%m/%Y %H:%M:%S", tz = "GMT"))
+ ,lon = Longitude,lat = Latitude,id = "W8257", lc = "G") %>%
+ filter(`Accuracy indicator` <= 100) %>%
+ select(id,date,lc,lon,lat)
fit_ssm(gps,vmax = 3,model = "crw",time.step = 10)
pre-filtering data...
fitting SSM...
Error in optim(par = c(logD = 0, l_rho_o = 0), fn = function (x = last.par[-random], :
L-BFGS-B needs finite values of 'fn'
Error in optimHess(par.fixed, obj$fn, obj$gr) :
gradient in optim evaluated to length 1 not 2
# A tibble: 1 x 3
id ssm converged
<chr> <list> <lgl>
1 W8257 <ssm> FALSE
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
From: Ian Jonsen<mailto:notifications@github.com>
Sent: 30 March 2020 14:32
To: ianjonsen/foieGras<mailto:foieGras@noreply.github.com>
Cc: Staniland, Iain J.<mailto:ijst@bas.ac.uk>; Author<mailto:author@noreply.github.com>
Subject: Re: [ianjonsen/foieGras] Errors fitting GPS data version 0.4.0 (#15)
Hi Iain, Hmm, you did find a wee bug in the prefilter code; GPS locations weren't getting assigned appropriately. I've added a temporary fix to the dev version, which you can get via:
remotes::install_github("ianjonsen/foieGras@dev")
Thanks for pointing this out. Cheers, Ian
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#15 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACFBWKCPNYGZXSIAFCYWIADRKCNMPANCNFSM4LVEEPQA>.
This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system.
UK Research and Innovation has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UK Research and Innovation does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses.
Opinions, conclusions or other information in this message and attachments that are not related directly to UK Research and Innovation business are solely those of the author and do not represent the views of UK Research and Innovation.
|
Ugh, sorry. Should be all fixed now, your example works for me. All updates are now in the master branch - install_github("ianjonsen/foieGras") will install the fixes for you. |
Thanks Ian,
Updated package from Github and worked beautifully on all three datasets
Cheers Again
Iain
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
From: Ian Jonsen<mailto:notifications@github.com>
Sent: 08 April 2020 20:14
To: ianjonsen/foieGras<mailto:foieGras@noreply.github.com>
Cc: Staniland, Iain J.<mailto:ijst@bas.ac.uk>; Author<mailto:author@noreply.github.com>
Subject: Re: [ianjonsen/foieGras] Errors fitting GPS data version 0.4.0 (#15)
Ugh, sorry. Should be all fixed now, your example works for me. All updates are now in the master branch - install_github("ianjonsen/foieGras") will install the fixes for you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#15 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACFBWKBVSZ7A2V273HWFGBTRLTEIDANCNFSM4LVEEPQA>.
This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. Opinions, conclusions or other information in this message and attachments that are not related directly to UKRI business are solely those of the author and do not represent the views of UKRI.
|
Hi Ian,
Not a bug most likely user error!
I am getting the following error when I try to fit GPS data
fit_ssm(gps,vmax = 3,model = "crw",time.step = 10)
pre-filtering data...
fitting SSM...
Error in optim(par = c(logD = 10, l_rho_o = 0), fn = function (x = last.par[-random], :
L-BFGS-B needs finite values of 'fn'
Error in optimHess(par.fixed, obj$fn, obj$gr) :
gradient in optim evaluated to length 1 not 2
A tibble: 1 x 3
id ssm converged
1 W8254 FALSE
Any pointers appreciated!
Cheers
Iain Staniland
Desktop :
FoiegrasGPS.zip
The text was updated successfully, but these errors were encountered: