-
Notifications
You must be signed in to change notification settings - Fork 5
[WIP] LSTM in GenericHybridModel #217
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
base: main
Are you sure you want to change the base?
Conversation
…indow = time in KeyedArrays and DimArrays
| # DimensionalData | ||
| mat = Array(Matrix(dfnot)') | ||
| da = DimArray(mat, (Dim{:col}(Symbol.(names(dfnot))), Dim{:row}(1:size(dfnot, 1)))) | ||
| da = to_dimArray(dfnot) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please undo the changes to this to avoid conflicts with my other PR. I'm moving this to the documentation.
|
|
||
| docstring = """ | ||
| $(name)(NN, predictors, forcing, targets$(isempty(param_syms) ? "" : ", " * join(string.(param_syms), ", "))) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your editor is somehow touching other files, without real changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure when it came in - I suspect the formatting script
| _select_time(ŷ_t::KeyedArray, time_keys) = ŷ_t(time = time_keys) # KeyedArray: () syntax - view & differentiable | ||
| _select_time(ŷ_t::AbstractDimArray, time_keys) = ŷ_t[time = At(time_keys)] # DimArray: [] syntax - copy & differentiable | ||
|
|
||
| function assemble_loss(ŷ, y::Union{KeyedArray{T, 3}, AbstractDimArray{T, 3}}, y_nan, targets, loss_spec) where {T} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my original thinking for assemble_loss was to have only one, a generic function, and delegate/multidispatch on use cases to inner functions, such as _get_target_y, etc. We can come back to this later, once things work as expected.
| df = load_timeseries_netcdf("https://github.com/bask0/q10hybrid/raw/master/data/Synthetic4BookChap.nc") | ||
|
|
||
| # Select a subset of data for faster execution | ||
| df = df[1:20000, :] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| df = df[1:20000, :] | |
| df = df[1:20000, :] | |
| first(df, 5) |
same reason here. You get the gist 😄 .
Co-authored-by: Lazaro Alonso <lazarus.alon@gmail.com>
plotting = false