Skip to content

Conversation

@BernhardAhrens
Copy link
Collaborator

@BernhardAhrens BernhardAhrens commented Dec 27, 2025

  • steps towards integrating LSTMs into GenericHybridModels
  • works in principle
  • TODOs:
    • get rid off hardcoded in_dims and out_dims for LSTM
    • adapt for trainboard, only runs with plotting = false

@BernhardAhrens BernhardAhrens marked this pull request as draft December 27, 2025 17:16
# DimensionalData
mat = Array(Matrix(dfnot)')
da = DimArray(mat, (Dim{:col}(Symbol.(names(dfnot))), Dim{:row}(1:size(dfnot, 1))))
da = to_dimArray(dfnot)
Copy link
Member

@lazarusA lazarusA Dec 27, 2025

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), ", ")))
Copy link
Member

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.

Copy link
Collaborator Author

@BernhardAhrens BernhardAhrens Dec 27, 2025

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}
Copy link
Member

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, :]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
df = df[1:20000, :]
df = df[1:20000, :]
first(df, 5)

same reason here. You get the gist 😄 .

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

Successfully merging this pull request may close these issues.

3 participants