예제 #1
0
           ((float(data['cc']) - model.cc)/float(data_std['cc']))**2 + \
           ((float(data['cd']) - model.cd)/float(data_std['cd']))**2
    return expr


### Data reconciliation

theta_names = []  # no variables to estimate, use initialized values

pest = parmest.Estimator(reactor_design_model_for_datarec, data, theta_names,
                         SSE)
obj, theta, data_rec = pest.theta_est(
    return_values=['ca', 'cb', 'cc', 'cd', 'caf'])
print(obj)
print(theta)

parmest.grouped_boxplot(data[['ca', 'cb', 'cc', 'cd']],
                        data_rec[['ca', 'cb', 'cc', 'cd']],
                        group_names=['Data', 'Data Rec'])

### Parameter estimation using reconciled data

theta_names = ['k1', 'k2', 'k3']
data_rec['sv'] = data['sv']

pest = parmest.Estimator(reactor_design_model, data_rec, theta_names, SSE)
obj, theta = pest.theta_est()
print(obj)
print(theta)
print(theta_real)
예제 #2
0
 def test_grouped_boxplot(self):
     parmest.grouped_boxplot(self.A,
                             self.B,
                             normalize=True,
                             group_names=['A', 'B'])