CMS 3D CMS Logo

Functions | Variables
isotrackTrainRegressorNoOptimization Namespace Reference

Functions

def fac0 (jeta)
 
def fac1 (jeta)
 
def fac2 (jeta)
 
def propweights (y_true)
 

Variables

 _ = plt.plot(lims, lims)
 
list a0 = [0.973, 0.998, 0.992, 0.965 ]
 marinas correction form More...
 
list a1 = [0, -0.318, -0.261, -0.406]
 
list a2 = [0, 0, 0.047, 0.089]
 
 alpha
 
 args = parser1.parse_args(args=[])
 
 bins
 
list cols_to_minmax = ['t_delta', 't_hmaxNearP','t_emaxNearP', 't_hAnnular', 't_eAnnular','t_pt','t_nVtx','t_ieta','t_eHcal10', 't_eHcal30','t_rhoh','t_eHcal_x']
 
 data = df.values
 
 default
 
 df = pd.read_pickle(fName)
 
tuple dop = (X_test[:,16]/X_test[:,13])
 
tuple eop = (X_test[:,15]/X_test[:,13])
 
 fName = args.input
 
 help
 
 history = model.fit(X_train,Y_train , batch_size=5000, epochs=50, validation_split=0.2, verbose=1,sample_weight=propweights(Y_train))
 
list keya = []
 
 label
 
list lims = [0, 200]
 
 loc
 
 loss
 
tuple marinascorr = X_test[:,15]*mcorrval
 
list maxa = []
 
tuple mcorrval = vec0(abs(X_test[:,17])) + vec1(abs(X_test[:,17]))*eop*dop*( 1 + vec2(abs(X_test[:,17]))*dop)
 
 meany = np.mean(Y_train)
 
list mina = []
 
 model = Sequential()
 
 modv = args.modelv
 
int ntest = 20000
 
 optimizer
 
 parser1 = argparse.ArgumentParser()
 
 pmom = X_test[:,13]
 
 preds = model.predict(X_test[:,0:12])
 
 range
 
 stdy = np.std(Y_train)
 
 targets = data[:,12]
 
int testindx = data.shape[0] - ntest
 
 uncorrected = X_test[:,15]
 
 vec0 = np.vectorize(fac0)
 
 vec1 = np.vectorize(fac1)
 
 vec2 = np.vectorize(fac2)
 
 X_test = data[testindx:,:]
 
 X_train = data[:testindx,0:12]
 
 Y_train = data[:testindx,12]
 

Function Documentation

◆ fac0()

def isotrackTrainRegressorNoOptimization.fac0 (   jeta)

Definition at line 135 of file isotrackTrainRegressorNoOptimization.py.

References createfilelist.int.

135 def fac0(jeta):
136  PU_IETA_1 = 9
137  PU_IETA_2 = 16
138  PU_IETA_3 = 25
139  idx = (int(jeta >= PU_IETA_1) + int(jeta >= PU_IETA_2) + int(jeta >= PU_IETA_3))
140  return a0[idx]

◆ fac1()

def isotrackTrainRegressorNoOptimization.fac1 (   jeta)

Definition at line 141 of file isotrackTrainRegressorNoOptimization.py.

References createfilelist.int.

141 def fac1(jeta):
142  PU_IETA_1 = 9
143  PU_IETA_2 = 16
144  PU_IETA_3 = 25
145  idx = (int(jeta >= PU_IETA_1) + int(jeta >= PU_IETA_2) + int(jeta >= PU_IETA_3))
146  return a1[idx]

◆ fac2()

def isotrackTrainRegressorNoOptimization.fac2 (   jeta)

Definition at line 147 of file isotrackTrainRegressorNoOptimization.py.

References createfilelist.int.

147 def fac2(jeta):
148  PU_IETA_1 = 9
149  PU_IETA_2 = 16
150  PU_IETA_3 = 25
151  idx = (int(jeta >= PU_IETA_1) + int(jeta >= PU_IETA_2) + int(jeta >= PU_IETA_3))
152  return a2[idx]
153 
154 
155 # In[44]:
156 
157 

◆ propweights()

def isotrackTrainRegressorNoOptimization.propweights (   y_true)

Definition at line 174 of file isotrackTrainRegressorNoOptimization.py.

References funct.abs().

174 def propweights(y_true):
175  weight = np.copy(y_true)
176  weight[abs(y_true - meany) > 0] = 1.90*abs(y_true - meany)/stdy #1.25
177 # weight[abs(y_true - meany) > stdy] = 1.75*abs((weight[abs(y_true - meany) > stdy]) - meany)/(stdy)
178  weight[abs(y_true - meany) < stdy] = 1
179  print ("wieght : ", weight)
180  return weight
181 
182 
183 # In[46]:
184 
185 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Variable Documentation

◆ _

isotrackTrainRegressorNoOptimization._ = plt.plot(lims, lims)
private

Definition at line 270 of file isotrackTrainRegressorNoOptimization.py.

◆ a0

list isotrackTrainRegressorNoOptimization.a0 = [0.973, 0.998, 0.992, 0.965 ]

marinas correction form

Definition at line 132 of file isotrackTrainRegressorNoOptimization.py.

◆ a1

list isotrackTrainRegressorNoOptimization.a1 = [0, -0.318, -0.261, -0.406]

Definition at line 133 of file isotrackTrainRegressorNoOptimization.py.

◆ a2

list isotrackTrainRegressorNoOptimization.a2 = [0, 0, 0.047, 0.089]

Definition at line 134 of file isotrackTrainRegressorNoOptimization.py.

◆ alpha

isotrackTrainRegressorNoOptimization.alpha

Definition at line 230 of file isotrackTrainRegressorNoOptimization.py.

◆ args

isotrackTrainRegressorNoOptimization.args = parser1.parse_args(args=[])

Definition at line 43 of file isotrackTrainRegressorNoOptimization.py.

◆ bins

isotrackTrainRegressorNoOptimization.bins

Definition at line 230 of file isotrackTrainRegressorNoOptimization.py.

◆ cols_to_minmax

list isotrackTrainRegressorNoOptimization.cols_to_minmax = ['t_delta', 't_hmaxNearP','t_emaxNearP', 't_hAnnular', 't_eAnnular','t_pt','t_nVtx','t_ieta','t_eHcal10', 't_eHcal30','t_rhoh','t_eHcal_x']

Definition at line 90 of file isotrackTrainRegressorNoOptimization.py.

◆ data

isotrackTrainRegressorNoOptimization.data = df.values

Definition at line 96 of file isotrackTrainRegressorNoOptimization.py.

◆ default

isotrackTrainRegressorNoOptimization.default

Definition at line 40 of file isotrackTrainRegressorNoOptimization.py.

◆ df

isotrackTrainRegressorNoOptimization.df = pd.read_pickle(fName)

Definition at line 59 of file isotrackTrainRegressorNoOptimization.py.

◆ dop

tuple isotrackTrainRegressorNoOptimization.dop = (X_test[:,16]/X_test[:,13])

Definition at line 164 of file isotrackTrainRegressorNoOptimization.py.

◆ eop

tuple isotrackTrainRegressorNoOptimization.eop = (X_test[:,15]/X_test[:,13])

Definition at line 163 of file isotrackTrainRegressorNoOptimization.py.

◆ fName

isotrackTrainRegressorNoOptimization.fName = args.input

Definition at line 45 of file isotrackTrainRegressorNoOptimization.py.

◆ help

isotrackTrainRegressorNoOptimization.help

Definition at line 40 of file isotrackTrainRegressorNoOptimization.py.

◆ history

isotrackTrainRegressorNoOptimization.history = model.fit(X_train,Y_train , batch_size=5000, epochs=50, validation_split=0.2, verbose=1,sample_weight=propweights(Y_train))

Definition at line 206 of file isotrackTrainRegressorNoOptimization.py.

◆ keya

list isotrackTrainRegressorNoOptimization.keya = []

Definition at line 74 of file isotrackTrainRegressorNoOptimization.py.

◆ label

isotrackTrainRegressorNoOptimization.label

Definition at line 230 of file isotrackTrainRegressorNoOptimization.py.

◆ lims

list isotrackTrainRegressorNoOptimization.lims = [0, 200]

Definition at line 267 of file isotrackTrainRegressorNoOptimization.py.

◆ loc

isotrackTrainRegressorNoOptimization.loc

Definition at line 217 of file isotrackTrainRegressorNoOptimization.py.

◆ loss

isotrackTrainRegressorNoOptimization.loss

Definition at line 201 of file isotrackTrainRegressorNoOptimization.py.

◆ marinascorr

tuple isotrackTrainRegressorNoOptimization.marinascorr = X_test[:,15]*mcorrval

Definition at line 229 of file isotrackTrainRegressorNoOptimization.py.

◆ maxa

list isotrackTrainRegressorNoOptimization.maxa = []

Definition at line 73 of file isotrackTrainRegressorNoOptimization.py.

◆ mcorrval

tuple isotrackTrainRegressorNoOptimization.mcorrval = vec0(abs(X_test[:,17])) + vec1(abs(X_test[:,17]))*eop*dop*( 1 + vec2(abs(X_test[:,17]))*dop)

Definition at line 168 of file isotrackTrainRegressorNoOptimization.py.

◆ meany

isotrackTrainRegressorNoOptimization.meany = np.mean(Y_train)

Definition at line 122 of file isotrackTrainRegressorNoOptimization.py.

◆ mina

list isotrackTrainRegressorNoOptimization.mina = []

Definition at line 72 of file isotrackTrainRegressorNoOptimization.py.

◆ model

isotrackTrainRegressorNoOptimization.model = Sequential()

Definition at line 188 of file isotrackTrainRegressorNoOptimization.py.

◆ modv

isotrackTrainRegressorNoOptimization.modv = args.modelv

Definition at line 46 of file isotrackTrainRegressorNoOptimization.py.

◆ ntest

int isotrackTrainRegressorNoOptimization.ntest = 20000

Definition at line 108 of file isotrackTrainRegressorNoOptimization.py.

◆ optimizer

isotrackTrainRegressorNoOptimization.optimizer

Definition at line 201 of file isotrackTrainRegressorNoOptimization.py.

◆ parser1

isotrackTrainRegressorNoOptimization.parser1 = argparse.ArgumentParser()

◆ pmom

isotrackTrainRegressorNoOptimization.pmom = X_test[:,13]

Definition at line 279 of file isotrackTrainRegressorNoOptimization.py.

◆ preds

isotrackTrainRegressorNoOptimization.preds = model.predict(X_test[:,0:12])

Definition at line 226 of file isotrackTrainRegressorNoOptimization.py.

◆ range

isotrackTrainRegressorNoOptimization.range

Definition at line 230 of file isotrackTrainRegressorNoOptimization.py.

◆ stdy

isotrackTrainRegressorNoOptimization.stdy = np.std(Y_train)

Definition at line 124 of file isotrackTrainRegressorNoOptimization.py.

◆ targets

isotrackTrainRegressorNoOptimization.targets = data[:,12]

Definition at line 98 of file isotrackTrainRegressorNoOptimization.py.

◆ testindx

int isotrackTrainRegressorNoOptimization.testindx = data.shape[0] - ntest

Definition at line 109 of file isotrackTrainRegressorNoOptimization.py.

◆ uncorrected

isotrackTrainRegressorNoOptimization.uncorrected = X_test[:,15]

Definition at line 228 of file isotrackTrainRegressorNoOptimization.py.

◆ vec0

isotrackTrainRegressorNoOptimization.vec0 = np.vectorize(fac0)

Definition at line 158 of file isotrackTrainRegressorNoOptimization.py.

◆ vec1

isotrackTrainRegressorNoOptimization.vec1 = np.vectorize(fac1)

Definition at line 159 of file isotrackTrainRegressorNoOptimization.py.

◆ vec2

isotrackTrainRegressorNoOptimization.vec2 = np.vectorize(fac2)

Definition at line 160 of file isotrackTrainRegressorNoOptimization.py.

◆ X_test

isotrackTrainRegressorNoOptimization.X_test = data[testindx:,:]

Definition at line 118 of file isotrackTrainRegressorNoOptimization.py.

◆ X_train

isotrackTrainRegressorNoOptimization.X_train = data[:testindx,0:12]

Definition at line 116 of file isotrackTrainRegressorNoOptimization.py.

◆ Y_train

isotrackTrainRegressorNoOptimization.Y_train = data[:testindx,12]

Definition at line 117 of file isotrackTrainRegressorNoOptimization.py.