Thief of Wealth
Check isnan, isfinite
개발/ML+ Data Science 2019. 11. 6. 21:15

np.isnan(all_chevorlet.any()) #and gets False np.isfinite(all_chevorlet.all()) #and gets True

꿀팁! 데이터분석할땐 python으로 힘들면 샘플을 엑셀로 다뤄보기
개발/ML+ Data Science 2019. 11. 5. 22:47

꿀팁! 데이터분석할땐 python으로 힘들면 샘플을 엑셀로 다뤄보기 python으로 다루면 잘 보이지 않았던 것들이 엑셀로보니까 다양하게 좀더 직관적으로 데이터를 훑어볼 수 있었음.

각 column에 nan값 수 체크하는 템픞릿
개발/ML+ Data Science 2019. 10. 18. 11:01

for col in test.columns: if test[col].isna().sum()>0: print (col,test[col].isna().sum())

TensorFlow Js 공부사이트
개발/ML+ Data Science 2019. 10. 18. 01:36

https://www.manning.com/books/deep-learning-with-javascript

fillna ffill bfill
개발/ML+ Data Science 2019. 10. 16. 12:18

humidity = humidity.fillna(method='ffill') It is cleaned using fillna() method with ffill parameter which propagates last valid observation to fill gaps .fillna(method='bfill') First, we used ffill parameter which propagates last valid observation to fill gaps. Then we use bfill to propogate next valid observation to fill gaps. bfill이 뒤에 걸로 앞으 Nan값을 채우겠다는 뜻.

Prophet model Save & Load
개발/ML+ Data Science 2019. 10. 14. 20:57

https://github.com/facebook/prophet/issues/725 import pickle pkl_path = "path/to/save/Prophet.pkl" with open(pkl_path, "wb") as f: # Pickle the 'Prophet' model using the highest protocol available. pickle.dump(m, f) # save the dataframe forecast.to_pickle("path/to/data/forecast.pkl") print("*** Data Saved ***")Then to load them again# read the Prophet model object with open(pkl_path, 'rb') as f:..

ARIMA모델 저장하고 불러오기
개발/ML+ Data Science 2019. 10. 14. 11:31

https://machinelearningmastery.com/save-arima-time-series-forecasting-model-python/ from statsmodels.tsa.arima_model import ARIMA, ARIMAResults# fit modelmodel = ARIMA(X, order=(1,1,1))model_fit = model.fit()# save modelmodel_fit.save('model.pkl')# load modelloaded = ARIMAResults.load('model.pkl')

profile on loading

Loading...