Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

현재 쓰고 있는 stratify 기법 #107

Open
MignonDeveloper opened this issue Jun 10, 2021 · 0 comments
Open

현재 쓰고 있는 stratify 기법 #107

MignonDeveloper opened this issue Jun 10, 2021 · 0 comments

Comments

@MignonDeveloper
Copy link
Member

def __make_stratified_key(self, df):
    stratified = df.copy()
    result = []

    prev_userID = stratified.userID[0]
    for userID, answerCode in zip(stratified.userID, stratified.answerCode.shift(1)):
        if prev_userID != userID:
            result.append(answerCode)
            prev_userID = userID
    
    result.append(stratified.answerCode.loc[stratified.shape[0] -1])
    self.user_stratified_key = result

마지막 문제를 맞췄는지 틀렸는지를 기준으로 stratify를 진행했습니다! seed는 1997 입니당

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant