제일 처음에 쿠키를 발행했습니다. 그리고 응답과 헤더에는 쿠키가 남아있는 걸 확인했습니다. 이후, 포스트맨에서 쿠키를 발행하고 setMaxAge(0)을 이용해 없앴습니다. 그런데 헤더에는 쿠키의 기록이 계속 저장되어 있는 상태로 유지되었습니다. 이후, 포스트맨을 이용한 쿠키 테스트를 진행하는데 있어서 쿠키가 계속 헤더에 남아있는 채로 유지되길래 질문드립니다. (쿠키의 수명을 0으로 만든 이후에도 헤더에 쿠키가 계속 유지되는 사진) setMaxAge(0)을 하면 쿠키가 없어지는 게 정상맞나요? 원래 없어져야하는데 포스트맨에서 자동으로 등록해주다보니 이렇게 된건가요? 만약 맞다면, 쿠키가 소멸함에따라 헤더에서 쿠키 제거하는 방법이 없을까요?
위의 코드를 그대로 입력하고 baseline 코드까지 문제가 없다가 label에서 다음과 같은 에러가 발생했습니다. KeyError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py in get_loc(self, key) 3804 try: -> 3805 return self._engine.get_loc(casted_key) 3806 except KeyError as err: index.pyx in pandas._libs.index.IndexEngine.get_loc() index.pyx in pandas._libs.index.IndexEngine.get_loc() pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item() KeyError: 'Gender' The above exception was the direct cause of the following exception: 아래는 입력한 코드입니다. 어떤 부분이 문제일까요? ㅠㅠ #label from sklearn.preprocessing import LabelEncoder for col in cols : le = LabelEncoder() train[col] = le.fit_transform(train[col]) test[col] = le.transform(test[col]) train[cols].head()
안녕하세요. dir 이나 __all 관련해서,,, print(sklearn.__all__) 은 알겠는데요. 그 다음,,, from sklearn.ensemble import RandomForestClassifier 여기서,, randaomforestclassifier 이게 생각이 나지 않을때 이걸 찾을 수 있는 방법은 없는지요?
안녕하세요, 작업형3을 공부하던 중 궁금한 점이 생겨 문의드립니다. 어떤 상황에서 T검정, 카이제곱 검정, 회귀분석, 분산분석(ANOVA)를 수행하는건지 명확히 분류가 잘 안 되는데 위와 같이 T검정, 카이제곱 검정, 회귀분석, 분산분석 중 어떤 것을 수행할지는 문제에서 주어지는 사항일까요? 감사합니다!
안녕하세요. 저는 전공자고, 자바는 학교에서 배운 상태입니다. 백엔드 공부하려고 김영한 선생님 로드맵 따라가고 있고, 현재 스프링 입문 강의까지 맞춘 상태입니다. 스프링에 처음 접하는데 스프링 입문 강의를 듣고 기능적인 부분은 대충 이해를 하였는데, 문법적인 것들은 처음 접해서 어려움을 느끼고 있습니다. 혹시 스프링에 대해 따로 공부하고 로드맵을 진행해야 할까요? 아니면 따로 스프링 공부 없이 로드맵을 따라가도 괜찮을까요..?
train = pd.read_csv('/kaggle/input/working8-2/churn_train.csv') test = pd.read_csv('/kaggle/input/working8-2/churn_test.csv') target = train.pop('TotalCharges') train = pd.get_dummies(train) test = pd.get_dummies(test) 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=2022) from sklearn.metrics import mean_absolute_error from sklearn.ensemble import RandomForestRegressor rf = RandomForestRegressor(random_state=2022, max_depth=7, n_estimators=600) rf.fit(X_tr,y_tr) pred = rf.predict(X_val) answer = rf.predict(test) rf.predict(X_val)까지는 잘 예측이 되어, 866.4986350062683의 값을 얻었습니다. 그리하여 마지막으로 본 test파일을 예측하여 제출하려고 하는데, 계속해서 오류가 발생하네요 ㅠㅠㅠ 아래는 에러 코드입니다. ValueError Traceback (most recent call last) Cell In[97], line 14 12 rf.fit(X_tr,y_tr) 13 pred = rf.predict(X_val) ---> 14 answer = rf.predict(test) File /opt/conda/lib/python3.10/site-packages/sklearn/ensemble/_forest.py:981, in ForestRegressor.predict(self, X) 979 check_is_fitted(self) 980 # Check data --> 981 X = self._validate_X_predict(X) 983 # Assign chunk of trees to jobs 984 n_jobs, _, _ = _partition_estimators(self.n_estimators, self.n_jobs) File /opt/conda/lib/python3.10/site-packages/sklearn/ensemble/_forest.py:602, in BaseForest._validate_X_predict(self, X) 599 """ 600 Validate X whenever one tries to predict, apply, predict_proba.""" 601 check_is_fitted(self) --> 602 X = self._validate_data(X, dtype=DTYPE, accept_sparse="csr", reset=False) 603 if issparse(X) and (X.indices.dtype != np.intc or X.indptr.dtype != np.intc): 604 raise ValueError("No support for np.int64 index based sparse matrices") File /opt/conda/lib/python3.10/site-packages/sklearn/base.py:548, in BaseEstimator._validate_data(self, X, y, reset, validate_separately, **check_params) 483 def _validate_data( 484 self, 485 X="no_validation", (...) 489 **check_params, 490 ): 491 """Validate input data and set or check the `n_features_in_` attribute. 492 493 Parameters (...) 546 validated. 547 """ --> 548 self._check_feature_names(X, reset=reset) 550 if y is None and self._get_tags()["requires_y"]: 551 raise ValueError( 552 f"This {self.__class__.__name__} estimator " 553 "requires y to be passed, but the target y is None." 554 ) File /opt/conda/lib/python3.10/site-packages/sklearn/base.py:481, in BaseEstimator._check_feature_names(self, X, reset) 476 if not missing_names and not unexpected_names: 477 message += ( 478 "Feature names must be in the same order as they were in fit.\n" 479 ) --> 481 raise ValueError(message) ValueError: The feature names should match those that were passed during fit. Feature names unseen at fit time: - customerID_CUST0001 - customerID_CUST0002 - customerID_CUST0006 - customerID_CUST0007 - customerID_CUST0008 - ... Feature names seen at fit time, yet now missing: - customerID_CUST0000 - customerID_CUST0003 - customerID_CUST0004 - customerID_CUST0005 - customerID_CUST0009 - ...
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가 요? (예) transacional어노테이션을 추가했는데 빨간불이 나오느데 어떻게 해야하나요? 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요.
>> views 컬럼에 결측치가 있는 데이터(행)을 삭제하고, f3 컬럼의 결측치는 0, silver는 1, gold는 2, vip는 3 으로 변환한 후 총 합을 정수형으로 출력하시오<< 이 문제를 풀이할 때, 강사님이 말씀해주신 것처럼 문제를 풀었는데 답 밑에 이런 문구들이 표기됩니다. 133 <ipython-input-34-9be3d2c84afd>:11: 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('silver',1).replace('gold',2).replace('vip',3) 이렇게 표기되어도 정답 인정은 되는 것인지 궁금합니다.
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 안녕하세요! 열심히 한강의씩 듣고있는 수강생입니다. 항상 너무 자세히 설명도 너무 잘 해주셔서 감사합니다. 일원분산분석 수강중 melt를 진행하고 이렇게 나온것까지는 이해가 됐습니다! 혹시 분산분석테이블에서 ols를 할 때 종속, 독립을 넣어야하는데 어떻게 구분해야할지가 문득 궁금해져서 질문을 남기게 되었습니다..! 보통은 맨 우측에있는 부분을 종속변수로 알면 될까요?
#text= text.replace("파이썬", "머신러닝").replace("분석기사", "분석을 위한") 에서 여러단어 변경 시 유의사항으로 앞에서 부터 실행돼서 파이썬부터 머신러닝으로 바꿔야 한다고 말씀하셨는데 앞에서 부터 실행되면 분석기사부터 바꿔야되는 거 아닌가요? 왜냐면 text = 빅데이터 분석기사 파이썬 공부 순이라서. 앞에서 부터 실행된다는게 분석기사부터 바뀌는게 아닌가 하는 생각이 들어서 여쭤봅니다. #text= text.replace("분석기사", "분석을 위한").replace("파이썬", "머신러닝") 으로 바꿔서 실행해보니 '빅데이터 분석을 위한 머신러닝 공부' 라는 값이 도출됩니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 섹션8: 상품수정강의에서 1:51부분이 상품 수정 form이 안열립니다. @PathVariable("itemId") 이렇게 고쳤고, 설정에 gradle도 인틀리제이에서 gradle로 바꾸고 했는데도 안됩니다.. 어떻게 해야 할까요?