You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think we should create a data structure for time series input to the NN model to separate out time-stepping from input series. We must account for two things in that:
The input series time stamps may not coincide with the NN model's time-stamps (especially when coupling to ADCIRC). Therefore, we need to allow for (linear) interpolation from input series onto the current time stamp of the NN model.
The rainfall input and the water surface elevation are currently stored in a single variable in the code (created through pandas.read_csv() call). The rainfall and elevation input variables must be separated because when coupling with ADCIRC, the values as well as the time stamps of the elevation input to the NN model must be modified, whereas those of the rainfall input remain unchanged.
Therefore, I propose we have something like the following:
classInputTS():
def__init__(self, times, values):
'''InputTS class constructor.'''self.times=timesself.values=valuesself.current_index=0def_getTimeInterval(self, t):
'''Get the time interval of the current time stamp.'''returnindexdefupdateTimeInterval(self, t):
'''Update the time interval by updating current_index.'''returnNonedefinterpolate(self, time):
'''Interpolate input series onto NN model's current time.'''returnvalue
The text was updated successfully, but these errors were encountered:
I'm not against it. But I want to point out two things:
pandas.read_csv essentially reads a spreadsheet and turn it into a pandas Dataframe. You can easily overwrite any column as you wish (whether it is rainfall or water level).
I feel the current code is already a little complicated. We probably want to make it liter and more understandable by using standard libraries.
We will continue to use pandas on the neural network side. The code ended up looking complicated because I prioritized development speed instead of keeping the code organized. I'll clean up the code at some point for sure.
Nevertheless I have added a few commits in #3 for this issue. This still adds the class on the lines of the code snippet I mentioned earlier, that is,
classInputTS():
and so on. This is not part of the NN model, but is a part of the AdcircNN class.
I think we should create a data structure for time series input to the NN model to separate out time-stepping from input series. We must account for two things in that:
pandas.read_csv()
call). The rainfall and elevation input variables must be separated because when coupling with ADCIRC, the values as well as the time stamps of the elevation input to the NN model must be modified, whereas those of the rainfall input remain unchanged.Therefore, I propose we have something like the following:
The text was updated successfully, but these errors were encountered: