- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. =tree.plot tree(clf, feature_names=iris.feature_names, class_names=iris.traget_names, filled=True) 이부분에서 iris.target_names을 numpy.ndarray배열로 인식하고 리스트로 인식을 안한다고 해서 에러가 뜹니당...ㅎ scikit=learn이 업데이트 된 거 같아요
안녕하세요 강사님. 제목의 강의 중에서 depth_first 함수의 동작이 궁금하여 기본 코드에서 "2.코드 변경"과 같이 print 문을 추가 하여 분석 중 "3. 실행결과"와 같이 출력 되는 것을 확인 하였습니다. 질문 Node(3) 출력하기 전에 s-yield가 한번 출력 되어야 할 것 같은데 두 번 출력에 대한 해석이 안됩니다. f-yield Node(3) s-yield Node(1) Node(3) s-yield Node(0) Node(3) Node(3) @@추가 질문을 올려 놓고 고민 하다 보니 Node(1).depth_first() 함수가 한번만 호출 된다고 생각했는데. 프로그램이 종료 될 때 까지 총 4번이 호출 되면 말이 되는 듯 한데.. 추측한 시나리오가 맞는지요? Node(1).depth_first() : next(Node(1)) 4번 호출 Node(3).depth_first() : next(Node(3)) 2번 호출 Node(4).depth_first() : next(Node(4)) 2번 호출 Node(2).depth_first() : next(Node(2)) 3번 호출 Node(5).depth_first() : next(Node(5)) 2번 호출 코드 변경 def depth_first(self): print("f-yield",self) yield self print("f-next",self) for c in self: for x in c.depth_first(): print("s-yield",self,x) yield x print("s-next",self,x) 실행 결과 f-yield Node(0) Node(0) f-next Node(0) f-yield Node(1) s-yield Node(0) Node(1) Node(1) s-next Node(0) Node(1) f-next Node(1) f-yield Node(3) s-yield Node(1) Node(3) s-yield Node(0) Node(3) Node(3) s-next Node(0) Node(3) s-next Node(1) Node(3) f-next Node(3) f-yield Node(4) s-yield Node(1) Node(4) s-yield Node(0) Node(4) Node(4) s-next Node(0) Node(4) s-next Node(1) Node(4) f-next Node(4) f-yield Node(2) s-yield Node(0) Node(2) Node(2) s-next Node(0) Node(2) f-next Node(2) f-yield Node(5) s-yield Node(2) Node(5) s-yield Node(0) Node(5) Node(5) s-next Node(0) Node(5) s-next Node(2) Node(5) f-next Node(5)
안녕하세요. feature scaling 부분에 그래프 예시 (before, after) 에 표준정규화를 거치면 분포가 다 같아지는것처럼 그려졌는데 각각 다른 분포를 가진 데이터들이 전부 같은 분포로 바뀌게 되면 서로 다른 데이터의 의미자체를 잃어버리는것 아닌가요? 감사합니다.
11분 55초에서 nan_abalone_df.mean() 를 입력하면 아래와 같은 오류가 발생합니다. 선생님과 코드가 모두 동일한데 . 왜이럴까요. --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-105-677ba292c7ae> in <cell line: 0>() ----> 1 nan_abalone_df.mean() 10 frames /usr/local/lib/python3.11/dist-packages/pandas/core/nanops.py in _ensure_numeric(x) 1684 if inferred in ["string", "mixed"]: 1685 # GH#44008, GH#36703 avoid casting e.g. strings to numeric -> 1686 raise TypeError(f"Could not convert {x} to numeric") 1687 try: 1688 x = x.astype(np.complex128) TypeError: Could not convert ['MMFMIIFFMFFMMFFMIFMMMIFFFFFMMMMFMFFMFFFMFFIIIIMFIFIMMFMFMMIFMMFMMMFFFIMFFMFFMFFFFMFMMFMMFFMMMFMMMMMFIMMMMFFFFFMMIMFFFMFMFIFMIIIIMMMFFIIFFMFMFFMMMFMIIIMFFFFMFMFFMFMFFMFFMFMFMFIIIIIMMMFFFMFFFFMMMIFMFMMMFMFFMFIIFIFMFMFMMIMFFFFFIFFIFFMMMIIIIIIIMIIIIIIIIIIMFFMMMMFFFFMIMFMMMFFMMMMMFMMFFIFMMFMFMFMFMFMIIIMMFFMMFIIMMMFMMFMIFMFIIIMIMIIMMIMFIIFMMMMFMFMFFMFIIMFFMMMMMFMFMFFFFMMFMFFFFFMFMFMFMMMMMFMMMIIMFIIIFMMMFMFFIFMMMMMMFMFFFMFMFIFIIMFMFFFMMMIMIIMMII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length_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_longlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_shortlength_shortlength_shortlength_longlength_shortlength_shortlength_longlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_longlength_longlength_shortlength_shortlength_longlength_shortlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_shortlength_longlength_longlength_longlength_longlength_longlength_shortlength_longlength_longlength_longlength_longlength_longlength_longlength_longlength_shortlength_shortlength_shortlength_shortlength_shortlength_longlength_shortlength_shortlength_longlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_longlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlength_shortlen...
안녕하세요 다른 쥬피터랩에서 실행하고 있는데요.. import koreanize_matplotlib 진행을 했는데도... import koreanize_matplotlib import matplotlib.pyplot as plt import seaborn as sns import pandas as pd from pandas.plotting import register_matplotlib_converters # 그래프에 retina display 적용 %config InlineBackend.figure_format = 'retina' register_matplotlib_converters() # Matplotlib에서 날짜 데이터를 처리하기 위한 변환기 등록 # 데이터 예시 (실제 사용 시 'data' DataFrame이 필요합니다) data = pd.DataFrame({ '등록일시': ['2023-01-01', '2023-02-01', '2023-03-01'], '참가업체수': [10, 15, 20] }) data['등록일시'] = pd.to _datetime(data['등록일시']) # '등록일시'를 기준으로 데이터 정렬 data_sorted = data.sort_values('등록일시') # 시간에 따른 '참가업체수' 선 그래프 그리기 plt.figure(figsize=(12, 6)) # 그래프 크기 설정 sns.lineplot(data=data_sorted, x='등록일시', y='참가업체수') # 선 그래프 생성 plt.title('시간에 따른 참가업체수 분석') # 그래프 제목 설정 plt.xlabel('날짜') # x축 라벨 설정 plt.ylabel('참가업체수') # y축 라벨 설정 plt.xticks(rotation=45) # x축 눈금 라벨 회전 plt.tight_layout() # 그래프 레이아웃 조정 # 그래프 표시 plt.show ( ) 이런 에러가 계속 나서요.. 혹시 어떻게 진행하면...될까요 ㅜㅜ
안녕하세요, https://github.com/FinanceData/FinanceDataReader?tab=readme-ov-file 수업듣고 있는데, tutorial 부분에 6개 종류가 더있는 것 같은데 실제 깃에는 2개밖에 없어서요 혹시 2024년 기준으로 업데이트 된 걸까요?? - 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
좋은 강의 감사합니다. 말씀하신대로 특정 조건에 따른 데이터를 찾는거 말고 수정할 때는 반복문으로 만 제어가 가능할까요? temp[temp['job'].apply(lambda x : x in ['student','manager'])] = 'whitehand' 이런식으로 하면 해당 row의 값 전체가 바뀌던데 job만 바꾸고 싶습니다.
강의 14분쯤에서 모델을 변경하는 부분입니다. 케라스가 업데이트 된 건지는 잘 모르겠지만 아래 부분에서 시퀀셜 모델이 레이어를 단일 값으로 받을 수 없어 에러가 납니다. encoder = Sequential(Dense(2, input_shape=(3, ))) decoder = Sequential(Dense(3, input_shape=(2, ))) autoencoder = Sequential([encoder, decoder]) autoencoder.summary() 아래 처럼 괄호로 감싸 리스트로 넘기면 해결됩니다. encoder = Sequential([Dense(2, input_shape=(3, ))]) decoder = Sequential([Dense(3, input_shape=(2, ))]) autoencoder = Sequential([encoder, decoder]) autoencoder.summary()
"Only instances of keras.Layer can be " 97 f"added to a Sequential model. Received: {layer} " ValueError: Only instances of keras.Layer can be added to a Sequential model. Received: <tensorflow_hub.keras_layer.KerasLayer object at 0x791605217610> (of type <class 'tensorflow_hub.keras_layer.KerasLayer'>) 위와 같은 오류가 나서 한참 찾았는데요. 원인은 tensorflow_hub와 tensorflow 간의 keras 필요 버전 차이에 있다고 합니다. 아래와 같이 keras를 별도 설치하여 임포트하여 사용하시면 정상 작동됩니다. 같은 에러로 고민이신 분에게 도움이 됐으면 좋겠네요. 수정 소스 코드 !pip install tf_keras import tf_keras as tfk Trained_MobileNet_url = "https://tfhub.dev/google/tf2-preview/mobilenet_v2/classification/2" Trained_MobileNet = tfk.Sequential([ hub.KerasLayer(Trained_MobileNet_url, input_shape=(224, 224, 3)) ]) Trained_MobileNet.input, Trained_MobileNet.output