-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Hello,
I am very sorry to bother you. I have some questions about opinf to consult. First of all thank you for sharing the opinf code toolkit, I think the current tutorial is much better understood for non-professionals like me. I used data from my own numerical model based on three tutorial cases, mainly using the OpInf method as a surrogate model to solve inverse problems. But now I have some problems, I hope you can help me to answer them, thank you very much!
Problem 1
Taking the OpInf tutorial as an example, in the External Input tutorial, we use different boundary conditions as input u; In the Parametric Problems tutorial, we use different parameters as input /mu. The problem I am facing now is that when I combine these two cases together, I hope my ROM can be applicable to different boundary conditions and parameters simultaneously, but this raises the issue of dimensionality.
rom= opinf.ParametricROM(
basis=opinf.basis.PODBasis(num_vectors = 10),
ddt_estimator=opinf.ddt.UniformFiniteDifferencer(t, "ord6"),
model=opinf.models.ParametricContinuousModel(
operators = [
opinf.operators.AffineLinearOperator(coeffs=1),
opinf.operators.AffineInputOperator(coeffs=1),
opinf.operators.AffineConstantOperator(coeffs=1),
],
solver=opinf.lstsq.L2Solver(regularizer=1e-6),
),
)
rom.fit(parameters = K_list_train, states = H_list_train, inputs = Hr_train,)
- The shape of K_list_train is (10), where 10 is a different scalar parameter;
- The shape of H_list_train is (10, 4, N, T), where 10 is the corresponding parameter, 4 is different boundary conditions, N is the number of points, and T is the number of time points.
- The shape of Hr_train is (10, 4, 2, T), where 10 is the corresponding parameter, 4 is different boundary conditions, 2 is the input as a 2D vector (with boundary conditions on the left and right sides respectively), and T is the number of time points.
Among them, N=1000, T=120;But when I design the model like this, there will be error alerts
ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 1000 is different from 10000)
I was checking the ROM and found that full_date-dimension is 10000 instead of N=1000. I don't understand why ParametricROM is not compatible with Input Operators? Where did I go wrong? Could you please help point it out.
Problem 2
The cases in the tutorial are all one-dimensional. Do we need to flatten the data in two dimensions?
Problem 3
In the tutorial Problem Statement, the input parameters are one-dimensional. How to set high-dimensional parameters ?And what should be done when these parameters have no practical physical significance for the control equation.
For example, I use deep learning GAN to obtain random vectors as parameters and then train ROM. Because the AffineInputOperator in the Problem Statement tutorial seems to have practical significance in the control equation, while the random vector obtained using the parameterization method GAN may not be meaningful on its own and must go through GAN before it can be meaningful.
Problem 4
My question is whether preprocessing the data will change the projection structure of the control equations, and generally, transformations are linear. If I use nonlinear transformations such as BOX-COX transformations for some special problems, will the projected control equations change? Should I consider quadratic or cubic forms at this time?
Finally, I apologize for bothering you again. I have recently started learning OpInf and have found it to be very useful! I hope to receive your answer and also look forward to seeing increasingly rich OpInf documentation tutorials in the future!
Looking forward to receiving your reply.