inflearn logo
강의

Course

Instructor

Kaggle Advanced Machine Learning Practical Crash Course

previous_application Final processed dataset generation, model training and evaluation

LightGBM Iteration관련

423

big

5 asked

0

안녕하세요

LightGBM Iteration관련 문의드립니다.

설명해 주신 코드로 작성하였으나 이터레이션마다 Score가 표시되지 않습니다

verbose를 100으로 설저했는데 다음과 같이만 조회됩니다.

이유가 무엇일까요?

LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 10 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 10 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 8 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 9 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 8 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 10 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 11 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 9 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 11 Early stopping, best iteration is: [902] training's binary_logloss: 0.210459 valid_1's binary_logloss: 0.242339

from lightgbm import LGBMClassifier


clf = LGBMClassifier(

        n_jobs=-1, # CPU성능

        n_estimators=1000, #1000개 tree

        learning_rate=0.02, #학습률 낮을수록 정교함

        num_leaves=32, # 가지치기 수

        subsample=0.8, #활용할 sample비중

        max_depth=12, #가지깊이

        verbose=100, #출력메세지 최소화

        early_stopping_rounds= 50,

        eval_metric= 'auc'

        )

clf.fit(train_X, train_y, eval_set=[(train_X, train_y), (valid_X, valid_y)])


 

머신러닝 kaggle

Answer 2

0

big

lightgbm 버전은 4.1.0 이며, 강의내용과는 다르게 (강의 내용이 훨씬 직관적입니다.) 다음과 같이 출력됩니다.

--> 중간과정은 보이는데 성능현황이 안보이구요,
Test결과도 loss위주로만 조회됩니다.
아마도 이강의 작성시점의 version과 지금 코랩 상용버전의 차이에서 파라미터의 변경이 있었던 것 같습니다. (제 추측입니다.)
[LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 10 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 10 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 8 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 9 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 8 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 10 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 11 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 9 [LightGBM] [Debug] Trained a tree with leaves = 32 and depth = 11 Early stopping, best iteration is: [902] training's binary_logloss: 0.210459 valid_1's binary_logloss: 0.242339

0

dooleyz3525

안녕하십니까,

먼저 lightgbm 버전을 알 수 있을까요?

import lightgbm

print(lightgbm.__version__) 하시면 됩니다.

 

감사합니다.

0

big

감사합니다. 선생님 열정과 친절함 너무 훌륭하세요 존경합니다. 제가 선생님의 여러 강의 덕분에 이 공부를 포기하지 않을수 있게 되었습니다. 기나긴 여정 함께할수 있어 너무 감사합니다.

1

dooleyz3525

LightGBM이 4.X 대로 업그레이드 되면서 사용법등이 많이 변경이 되었습니다.

강의에 동일한 결과를 위해서는 Lightgbm을 3.3.2 로 downgrade가 필요합니다.

아래와 같이 pip install lightgbm==3.3.2 로 downgrade해 주십시요.

섹션 0의 LightGBM 설치 및 구글 클라우드 사용 시 유의사항에 자막으로 해당 사항을 기재했습니다. 참조 부탁드립니다.

 

sql사용

0

46

2

좋은 강의 감사드립니다.

0

73

2

8분 40초경 LGBClassifier에서 설정해주신 파라미터들 관련 질문

0

246

2

사용 가능한 RAM을 모두 사용한 후 세션이 다운되었습니다

0

601

1

안녕하세요 선생님

0

228

1

권철민교수님 진심으로 감사드립니다.

0

319

1

안녕하세요 선생님

0

351

1

# credit_card_balance 데이터셋 피쳐엔지니어링

0

268

1

초거대 데이터셋을 Submission하려면?

0

190

1

Library 관련 질문

0

351

3

최적화 함수 에러

0

589

4

안녕하세요 교수님 vm 관련해서 질문이 있습니다.

0

204

1

코드를 실행했는데 오류가 발생합니다

0

1981

2

bayes_opt 회귀 모델에 적용하려면..

0

267

1

타겟값의 로그변환에 대해서

0

781

1

아나콘다 환경설정

0

460

1

깃허브 주소 문의드립니다.

0

360

1

손실함수에 대한 질문

0

344

1

card_bal 데이터셋 시각화 관련 질문입니다

0

231

1

LGBM null값 처리에 관해 질문있습니다

0

540

1

컬럼 관련 질문

0

281

1

히스토그램 x 값

0

365

1

n_iter 횟수 넘음 질문

0

492

2

학습데이터 테스트데이터 분리

0

324

1