728x90
반응형

datascience 33

[Kaggle Courses] What is Model Validation (Evaluating)

Evaluating: 내가 만든 모델의 예측 정확성(predictive accuracy) 확인하기, 즉 모델의 퀄리티 요약하기 1. Evaluating의 한 가지 방법: MAE (Mean Absolute Error) 평균절대오차 error = actual - predicted from sklearn.metrics import mean_absolute_error predicted_data_y = data_model.predict(X) mean_absolute_error(y, predicted_data_y) 2. In-Sample Score의 문제점 -> 이 방법 쓰지 말자 In-Sample Score: train data로 predict을 하고 train data의 target data, 즉 목표값과 비교..

[Kaggle Courses] From Fitting to Prediction

1. Selecting Data for Modeling data = pd.read_csv( filename ) data.columns data = data.dropna(axis=0) - Selecting The Prediction Target: Dot-notation: 필요한 column 추출 prediction target(y) y = data.Price 2. Choosing "Features" (X) data_features = ['Rooms', 'Bathroom', 'Landsize', 'Lattitude', 'Longtitude'] X = data[data_features] 3. Building My Model Define: model의 타입은?( 결정트리? 다른 거?) Fit: data의 패턴을..

[Kaggle Courses] Basic Data Exploration - Ex.MelbourneHomePrice

Prediction of New House Price in Melbourne¶ ['Rooms', 'Bathroom', 'Landsize', 'Lattitude', 'Longtitude']에 따라 house의 Price가 어떻게 되는지 model을 만들자. In [6]: import pandas as pd #It has DataFrame(SQL) melbourne_file_path = r"C:\Users\32mou\Desktop\melb_data.csv\melb_data.csv" melbourne_data = pd.read_csv(melbourne_file_path) melbourne_data.describe() #Checking Missing Value is important Out[6]: Rooms P..

728x90
반응형