tomas3svoboda / ChroMo

Chromatography model determination
2 stars 0 forks source link

Sigle_Loss_Function.py #18

Open meloun67 opened 2 years ago

meloun67 commented 2 years ago

Calculates loss value of sigle particular solution and according time series. Serves for isotherm decision.

meloun67 commented 2 years ago

please check changes in diagram, the solvers must be called by Loss functions

meloun67 commented 2 years ago

@svoboad3 please try to program it according to MATLAB code image where mod_conc is modelCurve real_conc are concentrationTime[:, 1] err is lossValueIso PDEsolver_comp is Lin_Solver.py

meloun67 commented 2 years ago

We need to relativize our loss functions to number of points and concentration

meloun67 commented 2 years ago

We need to relativize our loss functions to number of points and concentration

divide the value by maximal conc

meloun67 commented 2 years ago

@svoboad3 this is done?

meloun67 commented 2 years ago

We need to relativize our loss functions to number of points and concentration

divide the value by maximal conc

Please program 4 types of loss function: 1) simple error: |cm-ce|/cmax 2) error squares: |cm-ce|^2/cmax^2 3) logaritmic simple error: ln(|cm-ce|/cmax) 4) logaritmic error squares: ln(|cm-ce|^2/cmax^2)

svoboad3 commented 2 years ago

Done, named the four variants Single_Loss_Function_1, Single_Loss_Function_2, Single_Loss_Function_3 and Single_Loss_Function_4.

meloun67 commented 2 years ago

Could you rename please: Single_Loss_Function_Simple, Single_Loss_Function_Squares, Single_Loss_Function_LogSimple, Single_Loss_Function_LogSquares. Thanks!

svoboad3 commented 2 years ago

Done

meloun67 commented 1 year ago

Comparison Factor (Fc) selection: 1) Fc = 1 2) Fc = 1 / maximalOutputConc 3) Fc = 1 / maximalOutputConc^2 4) Fc = 1 / feedConc 5) Fc = 1 / feedConc^2 6) Fc = 1 / feedMass 7) Fc = 1 / feedMass^2