Giá trị ngoại lai

Phân tích dữ liệu IoT bằng Python

Matthias Voppichler

IT Developer

Giá trị ngoại lai

Lý do xuất hiện giá trị ngoại lai trong dữ liệu:

  • Lỗi đo lường
  • Can thiệp/ghi sai
  • Sự kiện cực đoan
Phân tích dữ liệu IoT bằng Python

Giá trị ngoại lai

temp_mean = data["temperature"].mean() 
temp_std = data["temperature"].std()

data["mean"] = temp_mean
data["upper_limit"] = temp_mean + (temp_std * 3)
data["lower_limit"] = temp_mean - (temp_std * 3) 

print(data.iloc[0]["upper_limit"]) print(data.iloc[0]["mean"]) print(data.iloc[0]["lower_limit"])
29.513933116002725
14.5345
-0.44493311600272456
Phân tích dữ liệu IoT bằng Python

Biểu đồ ngoại lai

data.plot()

Trung bình, giới hạn trên và dưới dùng 3 * độ lệch chuẩn

Phân tích dữ liệu IoT bằng Python

Tự tương quan

from statsmodels.graphics import tsaplots

tsaplots.plot_acf(data['temperature'], lags=50)

Hình tự tương quan

Phân tích dữ liệu IoT bằng Python

Tự tương quan

from statsmodels.graphics import tsaplots

tsaplots.plot_acf(data['temperature'], lags=50)

Hình tự tương quan, mũi tên chỉ lag24

Phân tích dữ liệu IoT bằng Python

Hãy thực hành!

Phân tích dữ liệu IoT bằng Python

Preparing Video For Download...