Ejemplo n.º 1
0
	def update(self):
		l = self.t_current
		X = np.array([i for i in range(self.t_current)]).reshape(l, 1)
		GPRDegradationModel.update(self, X, self.HI[self.t_incipient:self.t_incipient+self.t_current])
Ejemplo n.º 2
0
	def initialize_model(self):
		GPRDegradationModel.__init__(self, self.HI)
Ejemplo n.º 3
0
	def predict(self):
		X = np.array([i for i in range(167)]).reshape(167, 1)
		Yp, Vp = GPRDegradationModel.predict(self, X)
		return Yp, Vp
Ejemplo n.º 4
0
 def initialize_model(self):
     GPRDegradationModel.__init__(self, self.HI[self.t_incipient])
Ejemplo n.º 5
0
 def predict(self, next_steps):
     l = self.t_current + next_steps
     X = np.array([i for i in range(l)]).reshape(l, 1)
     Yp, Vp = GPRDegradationModel.predict(self, X)
     self.t_current += next_steps
     return Yp, Vp
        if (iter_ / tracker == 1.0):
            continuously_deg_pts += 1
            initial_deg_pts.append(strangeness)
        else:
            initial_deg_pts = []
            continuously_deg_pts = 0
            iter_ = 0
            tracker = 0
            flag = False

    if (continuously_deg_pts >= min_continuous_deg_pts):
        break

# #-----------RUL Estimation-------------------------------------
hi_raw = np.array(initial_deg_pts).reshape(len(initial_deg_pts), 1)
rul_model = GPRDegradationModel(hi_raw, failure_threshold, order=1)
for i in range(deg_start_idx + min_continuous_deg_pts, len(files)):
    df = pd.read_csv(files[i],
                     sep='\t',
                     header=None,
                     names=(['0', '1', '2', '3']))
    fea = np.reshape([td.get_rms(df[str(test_bearing_idx)]),\
     td.get_kurtosis(df[str(test_bearing_idx)]),\
     td.get_crestfactor(df[str(test_bearing_idx)])],(-1,3))

    error = da.predict(som, fea, scaler).reshape(1, 1)
    error = pd.DataFrame(error)
    strangeness, _ = ad.test_cosmo(error)
    hi_raw = np.concatenate((hi_raw, strangeness.reshape(-1, 1)), axis=0)

    # predict next prediction_horizon intervals