logo

비지도학습 종합 복습

냉동창고 냉각설비 데이터로 표준화, PCA, K-Means 군집화와 이상치 탐지를 복습

실습 데이터: 냉동창고 냉각설비 운영

  • 한 행은 냉동창고 냉각설비의 한 운전 구간 기록
  • 숫자형 입력 변수 10개
  • 운전 유형은 저부하 보관, 일반 냉각, 급속 냉동의 세 종류
  • 전체 54건에 냉매 누설, 기계 결함, 센서 오류를 각각 18건씩 주입
컬럼 설명
record_id 운전 기록 ID
cooling_load_pct 냉각 부하(%)
outside_temp_c 외기 온도(°C)
compressor_power_kw 압축기 소비전력(kW)
suction_pressure_kpa 냉매 흡입 압력(kPa)
discharge_pressure_kpa 냉매 토출 압력(kPa)
evaporator_temp_c 증발기 온도(°C)
condenser_temp_c 응축기 온도(°C)
compressor_temp_c 압축기 온도(°C)
vibration_mm_s 진동 속도(mm/s)
energy_use_kwh 구간 에너지 사용량(kWh)
operation_profile 실제 운전 유형(light_storage, normal_cooling, rapid_freeze)
anomaly_type 실제 상태(normal, refrigerant_leak, mechanical_fault, sensor_fault)

파일을 Colab 현재 폴더에 업로드한 뒤 실행하세요.

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

df_refrigeration = pd.read_csv(
    "refrigeration_operations.csv"
)
df_refrigeration.head()

분석 변수 지정

군집화, PCA와 이상치 탐지에는 다음 10개 숫자형 변수만 사용하세요.

feature_cols = [
    "cooling_load_pct",
    "outside_temp_c",
    "compressor_power_kw",
    "suction_pressure_kpa",
    "discharge_pressure_kpa",
    "evaporator_temp_c",
    "condenser_temp_c",
    "compressor_temp_c",
    "vibration_mm_s",
    "energy_use_kwh",
]

X = df_refrigeration[feature_cols]

from sklearn.preprocessing import StandardScaler

X_scaled = StandardScaler().fit_transform(X)

퀴즈

문제 1 / 29맞음: 0힌트: 0틀림: 0채점중: 0남음: 29

냉동설비 운전 기록은 모두 몇 건인가요?

숫자 답안 입력 영역

퀴즈를 풀려면 대화형 기능을 불러와야 합니다.