안녕하세요 데이터 전처리 과정에서 궁금한 사항이 있어서 질문 드립니다. 결측치 처리할 때 결측치가 있는 컬럼들을 그냥 다 삭제를 해도 되는건가요? 결측치를 다른값으로 채우는 방법도 있는데 어떤 컬럼은 삭제하고 어떤 컬럼은 다른 값으로 채우는지 기준을 잘 모르겠습니다.(그래서 결측치가 있다면 그냥 다 삭제하는 방법으로 진행해도 되는지 궁금합니다.)
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 문제3번에 셀 실행하면 답도 나오고, 다른것도 나오는데, 무슨뜻이야? 133 <ipython-input-41-735169098>:16: FutureWarning: Downcasting behavior in `replace` is deprecated and will be removed in a future version. To retain the old behavior, explicitly call `result.infer_objects(copy=False)`. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)` df['f3'] = df['f3'].replace('vip',3)
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 원핫 인코딩이나 레이블 인코딩 할 때, 강의를 보면 object인 컬럼에서 카테고리(or nunique)가 같은지 비교하고 그에 따라 다르게 작업을 하는데요. 그냥 비교할 필요없이 항상 concat을 한 후에 원핫인코딩이든 레이블인코딩을 진행하면 불리한 점이 있을까요? 떄에 따라 다르게 대응하는 것보다는 기본적으로 concat을 하고 인코딩을 하는게 가장 안 헷갈리고 편한 방법 같아서 문의드립니다.
문제1-2. gender를 종속변수로 하고 나머지 변수들(age, length, diameter, height, weight)을 독립변수로 사용하는 로지스틱 회귀 모델을 적합시킨 후, 잔차 이탈도(Residual Deviance)를 계산하시오. (반올림하여 소수 둘째자리까지 계산) 인강에서는 glm으로 풀고 문제집에서는 logit으로 푸는데 그냥 glm 말고 logit으로 풀면 안되나요? 그리고 import statsmodels.api as sm 을 꼭 넣어야 하나요? 넣지 않아도 답이 나오더라구요.
The IAPP CIPP-A Exam is one of the most important certifications for privacy professionals in Asia. Offered by the International Association of Privacy Professionals (IAPP), this exam focuses on data protection laws, regulations, and practices in the Asia-Pacific region. It helps professionals understand how to manage and protect personal data according to local legal standards. CIPP-A stands for Certified Information Privacy Professional Asia. It is a respected certification for those working in legal, compliance, IT, and data management fields. Passing this exam shows that you understand privacy concepts and can apply them in real-world situations. It also improves your credibility in the global privacy industry. IAPP CIPP-A Exam Difficulty and Pass Rate Many candidates want to know how hard the IAPP CIPP-A Exam is and what the chances are of passing it. The exam is considered moderately difficult. It requires both legal knowledge and practical understanding of privacy rules in different Asian countries like Singapore, Hong Kong, South Korea, India, and others. The pass rate is not officially published by IAPP, but experts suggest that preparation is key. Most successful candidates spend at least 30-40 hours studying. They use practice exams, coursebooks, and online resources. A smart study plan and repeated practice can greatly improve your chances. Best Study Materials for the IAPP CIPP-A Exam A very common question is: what are the best materials to study for the IAPP CIPP-A Certification ? Many professionals recommend the official IAPP textbook for CIPP-A, along with training videos and practice tests. However, finding up-to-date, easy-to-understand resources can be hard. That’s why platforms like prepbolt are highly recommended. They offer simple, focused, and effective learning tools. You can access mock exams, summaries, and topic-wise questions that match the real exam format. These tools help you understand the concepts better and test your knowledge in a smart way. If you are serious about passing the CIPP-A exam on your first try, consider using trusted platforms like prepbolt . Their materials are prepared by experts and are made for busy professionals.
강사님 안녕하세요 데이터셋을 다루는 중에 이상치가 보여서 train 데이터는 전처리했는데, 혹시 test 데이터도 이상치가 있더라도 따로 처리하지 않고 그대로 두는 게 더 나은 걸까요? 그리고 현재 데이터셋으로 모델 평가했을 때 RMSE가 778 정도 나오는데, 이 정도면 성능이 괜찮은 걸까요? train.loc[1659,'총구매액'] = 0 train.loc[3174,'총구매액'] = 0 train.loc[3488,'총구매액']= 0 train.loc[1659,'최대구매액'] = 0 # print(train[(train['총구매액']<0) | (train['최대구매액']<0)]) print(test[test['최대구매액']<0]) #2 test.loc[579,'최대구매액'] = 0 test.loc[1177,'최대구매액'] = 0 print(test[test['최대구매액']<0]) 감사합니다
# 출력을 원하실 경우 print() 함수 활용 # 예시) print(df.head()) # getcwd(), chdir() 등 작업 폴더 설정 불필요 # 파일 경로 상 내부 드라이브 경로(C: 등) 접근 불가 import pandas as pd train = pd.read _csv("data/customer_train.csv") test = pd.read _csv("data/customer_test.csv") #총 구매금액 , rmse target = train.pop("총구매액") #수치형 변수 스케일링 cols = train.select _dtypes(exclude = 'object').columns from sklearn.preprocessing import MinMaxScaler mx = MinMaxScaler() train[cols] = mx.fit _transform(train[cols]) test[cols] = mx.transform(test[cols]) ob = train.select _dtypes(include = 'object').columns from sklearn.preprocessing import LabelEncoder for col in ob: le = LabelEncoder() train[col] = le.fit _transform(train[col]) test[col] = le.transform(test[col]) #데이터 나누기 from sklearn.model_selection import train_test_split x_tr , x_val , y_tr, y_val = train_test_split(train, target, test_size = 0.2, random_state = 0) import lightgbm as lg model = lg.LGBMRegressor(random_state = 0) model.fit (x_tr,y_tr) pred = model.predict(x_val) from sklearn.metrics import root_mean_squared_error r = root_mean_squared_error(y_val,pred) pred = model.predict(test) s = pd.DataFrame({"pred" : pred}) s.to _csv("result.csv", index= False) df = pd.read _csv("result.csv") #758.1836860967057 800정도가 나온다고 하던데 758이 나온거면 모델 성능이 더 좋다고 하는건데 이게 이상일수도 있을까요? 750점 대가 나오니까 불안하네요 ,, 추가로 이렇게 pd.read_csv로 확인했을때 제대로 나오면 그냥 제출하면 되는거죠??