타이타닉 생존 예측 프로젝트에서 에러

2024.05.02 10:26 760 조회
train_x = train.drop(columns='Survived')
train_y = train['Survived']
 
from sklearn.model_selection import train_test_split
train_x, val_x, train_y, val_y = train_test_split(train_x, train_y, test_size=0.2, random_state=0)


이렇게 코드를 작성했을 때 아래와 같은 에러가 납니다. 어떻게 해결해야 하나요?


---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[33], line 4
      1 train_x = train.drop(columns='Survived')
      2 train_y = train['Survived']
----> 4 from sklearn.model_selection import train_test_split
      5 train_x, val_x, train_y, val_y  = train_test_split(train_x, train_y, test_size=0.2, random_state=0)

ModuleNotFoundError: The module 'scikit-learn' is included in the Pyodide distribution, but it is not installed.
You can install it by calling:
  await micropip.install("scikit-learn") in Python, or
  await pyodide.loadPackage("scikit-learn") in JavaScript
See https://pyodide.org/en/stable/usage/loading-packages.html for more details.


로그인이 필요합니다
0 / 1000
DACON.JE
2024.05.02 14:27

삭제된 댓글입니다

DACON.JE
2024.05.02 14:27

안녕하세요.
데이스쿨 학습 오류 문제가 해결되었음을 알려드립니다. 
해결된 사항에 대한 자세한 내용은 아래 링크를 통해 확인하실 수 있습니다.
(https://dacon.io/forum/411696?page=1&dtype=recent&fType=&category=daschool)

이용에 불편을 드려 죄송하며, 앞으로도 지속적인 서비스 개선과 지원을 위해 최선을 다하겠습니다.
감사합니다.