Misollar
Xayoliy signal berilganda silliqlangan signal smooth_signal() yordamida olinishi mumkin:
>>> x = [1, 3, 4, 5, 6, 7, 5, 3, 1, 1]
>>> smoothed = smooth_signal(x, sample_rate = 2, window_length=4, polyorder=2)
>>> np.around(smoothed[0:4], 3)
array([1.114, 2.743, 4.086, 5. ])
Agar siz window_length ni belgilamasangiz, u namunaviy stavkaning 10% miqdorida hisoblanadi (g'alati qilish uchun kerak bo'lsa +1) >>> hp sifatida import yurak >>> ma'lumotlar, taymer = hp.load_exampledata(0) > >> tekislangan = silliq_signal (ma'lumotlar, namunaviy_stavka = 100)
Dostları ilə paylaş: |