inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

173만명의 커뮤니티!! 함께 토론해봐요.

함수내에서 인스턴스 생성전 사용하기위해선 static 메소드를 부여해야된다고 이해하면 될까요?

미해결

[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!

parseItemCode() 메소드에 static 을 부여해야 사용시 에러가 발생하지 않는데, 제가 알기론 static 메소드는 Class에서 instance를 생성하지 않고 사용가능한 메소드를 생성하기 위해 사용하는 것으로 압니다. 함수내에서 인스턴스 생성전 사용하기위해선 static 메소드를 부여해야된다고 이해하면 될까요?

  • 클론코딩
  • Flutter
mkp0131 댓글 1 좋아요 0 조회수 359

함수내에 타입을 선언시 에러가 나오는데 함수내에서는 타입 지정이 되지 않는 것인가요?

해결됨

[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!

void main() { enum ItemCode { // 미세먼지 PM10, // 초미세먼지 PM25, // 이산화질소 NO2, // 오존 O3, // 일산화탄소 CO, // 이황산가스 SO2, } final dd = ItemCode.values.firstWhere((element) => element.name == 'PM10'); print(dd == ItemCode.PM10); } 위와 같이 함수내에 타입을 선언시 에러가 나오는데 함수내에서는 타입 지정이 되지 않는 것인가요?

  • Flutter
  • 클론코딩
mkp0131 댓글 1 좋아요 0 조회수 301

hello-spring 빌드가 안되요.

미해결

스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술

[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 시작부터 막히니 머리가 핑 돌아요. 자바 버전이 문제인가, 싶어서 처음엔 프로젝트 스트럭쳐 건들다가 결국 자바 11 제외하고는 전부 삭제하고 환경 변수도 다시 건들고, 구글링과 질문란 이것저것 살펴보면서 시도해봤는데 머리만 더 꼬이고 해결은 되지 않아요 ㅠㅠ A problem occurred configuring root project 'hello-spring'. > Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.0. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.0 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.0 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5.1' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5.1') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 11) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5.1') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.0 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5.1') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.0 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5.1') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5.1') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.0 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 11) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5.1') * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. 짧은 영어 실력으로는 아무리 봐도 자바 버전 호환이 안되는 것 같은데, 11 제외하고 모두 삭제했는데도 이러네요 ㅠㅠ 다음은 cmd 에서 버전 확인 한 결과인데요 C:\Users\user>javac -version javac 11.0.2 C:\Users\user>java -version openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment 18.9 (build 11.0.2+9) OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode) C:\Users\user> 어떻게 해야 할까요...

  • spring-boot
  • java
  • MVC
  • spring
유성현 댓글 1 좋아요 1 조회수 1310

1-A 질문있습니다.

해결됨

10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트

http://boj.kr/d77ee0664b7049ed849e1aa6776fb359 다른 코드들과 비교해보는데도 왜 틀렸다고 하는지 모르겠습니다 ㅜㅜㅜ

  • 코테 준비 같이 해요!
  • C++
khs29216 댓글 1 좋아요 0 조회수 315

❗️긴급❗️ 선생님 실습파일이 잘못된것 같습니다.

해결됨

웹 애니메이션을 위한 GSAP 가이드 Part.01

다른 수업자료 같은데 확인 부탁드려요 ㅠㅠㅎ 잘못 올리신거같은데 ㅠㅠ 자료 변경하시면 이 글은 지울게용 답글좀 달아주세요 ㅠ

  • gsap
  • javascript
  • HTML/CSS
  • 인터랙티브-웹
댓글 1 좋아요 1 조회수 588

질문

미해결

10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 마지막 풀이에서 if(a[i][j] && visited[i] == 0) 이 부분이 잘 이해가 안 갑니다. 둘 중 하나라도 0이 있으면 go(i)이 실행되어야 하는 것 같은데, 왜 a[i][j]가 1, visited[i]가 0일 때 go(i)가 실행 되는지 모르겠습니다.

  • C++
  • 코테 준비 같이 해요!
댓글 2 좋아요 0 조회수 364

도메인 객체를 data class로 작성하지 않은 이유가 따로 있을까요?

해결됨

실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)

java의 코드를 그대로 옮기기 위해서 class로 진행을 하신건지 아니면 data class로 하면 안 되는 이유가 있는지요?

  • entity
  • java
  • dataclass
  • spring-boot
  • spring
  • kotlin
  • refactoring
최소의 실수, 최선의 개발 댓글 1 좋아요 1 조회수 828

lightgbm version 관련하여

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

안녕하세요. lightgbm 설치 관련하여 오류가 발생하여 연락드립니다. 선생님께서 말씀해 주신 파트를 따라서 설치를 해 보았는데요. lightgbm version이 3.2.1로 설치가 되며, 업그레이드가 되지 않습니다. 구글을 통해 찾은 여러 답변으로 업그레이드를 하려고 하였지만, 변화가 없습니다. 혹시 이런 경우 어떻게 해야 하나요?

  • 머신러닝 배워볼래요?
  • 통계
  • python
DAEHYUN KIM 댓글 1 좋아요 0 조회수 869

atom, vscode 차이점 관련 질문입니다.

미해결

프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)

강의 너무 잘듣고 있습니다. 단지 궁금한점은 atom은 결과값이 잘 보이는데 vscode로 하게 되면 저 terminal이라고 해야하나 정확한 용어는 모르겠는데, 저 주소들이 계속 반복적으로 나와서 atom과는 다르게 결과값을 확인하기가 어렵습니다.. 혹시 제가 뭔가를 잘못하고 있는걸까요? atom의 경우 결과값은 ctrl+shift+B로 확인하고 있고, vscode는 F5 키를 눌러서 확인하는데 이게 맞는지도 궁금해요

  • python
sunny 댓글 1 좋아요 0 조회수 513

초기 프로젝트 생성 후 메인 클래스 인식이 안돼요

해결됨

스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술

start.spring.io로 파일 만들어서 실행하고, project structure 들어가서 jdk도 11버전으로 설정해도 실행버튼이 안나타납니다. project setting에도 gradle에 직접 실행을 설정하는 부분이 안나오고, 뭐가 문제인지 모르겠습니다. 버전 문제는 아닌거같아 build.gradle 도 첨부합니다.

  • java
  • spring-boot
  • spring
  • MVC
박진우 댓글 2 좋아요 1 조회수 1002

@faker-js/faker 사용시 런타임 에러

미해결

[리뉴얼] React로 NodeBird SNS 만들기

안녕하세요? @faker-js/faker 사용 시 아래와 같은 런타임 에러가 발생하여 질문드립니다. Unhandled Runtime Error Error: Text content does not match server-rendered HTML. See more info here: https://nextjs.org/docs/messages/react-hydration-error Call Stack checkForUnmatchedText node_modules\react-dom\cjs\react-dom.development.js (9647:0) diffHydratedProperties node_modules\react-dom\cjs\react-dom.development.js (10310:0) hydrateInstance node_modules\react-dom\cjs\react-dom.development.js (11306:0) prepareToHydrateHostInstance node_modules\react-dom\cjs\react-dom.development.js (12564:0) completeWork node_modules\react-dom\cjs\react-dom.development.js (22181:0) completeUnitOfWork node_modules\react-dom\cjs\react-dom.development.js (26596:0) performUnitOfWork node_modules\react-dom\cjs\react-dom.development.js (26568:0) workLoopSync node_modules\react-dom\cjs\react-dom.development.js (26466:0) renderRootSync node_modules\react-dom\cjs\react-dom.development.js (26434:0) performConcurrentWorkOnRoot node_modules\react-dom\cjs\react-dom.development.js (25738:0) workLoop node_modules\scheduler\cjs\scheduler.development.js (266:0) flushWork node_modules\scheduler\cjs\scheduler.development.js (239:0) MessagePort.performWorkUntilDeadline node_modules\scheduler\cjs\scheduler.development.js (533:0) 아래 코드에서 faker.name .fullname()과 faker.lorem.paragraph() 를 일반 텍스트로 변경할 경우에는 런타임 에러가 발생하지 않습니다. faker 적용 직전 까지는 소스가 문제 없이 잘 동작하고 있는 상황이었습니다. import shortId from 'shortid'; import produce from 'immer'; import { faker } from '@faker-js/faker'; /* eslint-disable default-param-last */ export const initialState = { mainPosts: [ { id: 1, User: { id: 1, nickname: 'bumdigi', }, Images: [ { id: shortId.generate(), src: 'https://picsum.photos/200/300', }, ], content: 'hello #해시태그 #인스타#안녕', Comments: [ { id: shortId.generate(), User: { nickname: 'atom', }, content: 'hi atom', }, { id: shortId.generate(), User: { nickname: 'iron man', }, content: 'I am Iron man', }, ], }, ], imagePaths: [], addPostLoading: false, addPostDone: false, addPostError: false, removePostLoading: false, removePostDone: false, removePostError: false, addCommentLoading: false, addCommentDone: false, addCommentError: false, }; initialState.mainPosts = initialState.mainPosts.concat( Array(20) .fill() .map(() => ({ id: shortId.generate(), User: { id: shortId.generate(), nickname: faker.name.fullName(), }, content: faker.lorem.paragraph(), Images: [ { src: faker.image.imageUrl(), }, ], Comments: [ { User: { id: shortId.generate(), nickname: faker.name.fullName(), }, content: faker.lorem.sentence(), }, ], })) ); export const LOAD_POSTS_REQUEST = 'LOAD_POSTS_REQUEST'; export const LOAD_POSTS_SUCCESS = 'LOAD_POSTS_SUCCESS'; export const LOAD_POSTS_FAILURE = 'LOAD_POSTS_FAILURE'; export const ADD_POST_REQUEST = 'ADD_POST_REQUEST'; export const ADD_POST_SUCCESS = 'ADD_POST_SUCCESS'; export const ADD_POST_FAILURE = 'ADD_POST_FAILURE'; export const REMOVE_POST_REQUEST = 'REMOVE_POST_REQUEST'; export const REMOVE_POST_SUCCESS = 'REMOVE_POST_SUCCESS'; export const REMOVE_POST_FAILURE = 'REMOVE_POST_FAILURE'; export const ADD_COMMENT_REQUEST = 'ADD_COMMENT_REQUEST'; export const ADD_COMMENT_SUCCESS = 'ADD_COMMENT_SUCCESS'; export const ADD_COMMENT_FAILURE = 'ADD_COMMENT_FAILURE'; export const addPost = (data) => ({ type: ADD_POST_REQUEST, data, }); export const addComment = (data) => ({ type: ADD_COMMENT_REQUEST, data, }); const dummyPost = (data) => ({ id: data.id, content: data.content, User: { id: 1, nickname: '범디기', }, Images: [ { src: 'https://picsum.photos/200/300', }, { src: 'https://picsum.photos/200/300', }, { src: 'https://picsum.photos/200/300', }, ], Comments: [ { User: { nickname: 'mingry', }, content: '우와', }, { User: { nickname: 'groom', }, content: '냐옹', }, ], }); const dummyComment = (data) => ({ id: shortId.generate(), content: data, User: { id: 1, nickname: 'tomy', }, }); const reducer = (state = initialState, action) => { return produce(state, (draft) => { switch (action.type) { case ADD_POST_REQUEST: draft.addPostLoading = true; draft.addPostDone = false; draft.addPostError = null; break; case ADD_POST_SUCCESS: draft.mainPosts.unshift(dummyPost(action.data)); draft.addPostLoading = false; draft.addPostDone = true; break; case ADD_POST_FAILURE: draft.addPostLoading = false; draft.addPostError = action.error; break; case REMOVE_POST_REQUEST: draft.removePostLoading = true; draft.removePostDone = false; draft.removePostError = null; break; case REMOVE_POST_SUCCESS: draft.mainPosts = draft.mainPosts.filter((v) => v.id !== action.data); draft.removePostLoading = false; draft.removePostDone = true; break; case REMOVE_POST_FAILURE: draft.removePostLoading = false; draft.removePostError = action.error; break; case ADD_COMMENT_REQUEST: draft.addCommentLoading = true; draft.addCommentDone = false; draft.addCommentError = null; break; case ADD_COMMENT_SUCCESS: { const post = draft.mainPosts.find((v) => v.id === action.data.postId); post.Comments.unshift(dummyComment(action.data.content)); draft.addCommentLoading = false; draft.addCommentDone = true; break; } case ADD_COMMENT_FAILURE: draft.addCommentLoading = false; draft.addCommentError = action.error; break; default: break; } }); }; export default reducer;

  • redux
  • react
  • nodejs
  • express
  • Next.js
이상범 댓글 2 좋아요 1 조회수 970

Optional 질문드립니다.

미해결

더 자바, Java 8

Optional 첫번째 강의영상 10분20초쯤 나오는 내용인데요. progress.ifPresent((p) -> { this.progress = p }); 위와 같은 코드가 나오는데, 제가 알기로는 람다식에서는 외부변수를 변경하면 안되는것으로 알고있는데 this.progress는 외부변수인것같은데도 변경이 되는것 같아서요..! 이 경우에는 외부변수를 변경하는게 왜 가능한지 궁금합니다. 또, 변경가능하다면, 이렇게 외부변수를 변경하는 것은 지양해야하는 건가요?!

  • java
시골쥐 댓글 0 좋아요 0 조회수 498

질문드립니다.

미해결

[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part3: 유니티 엔진

수업에서 ResourceManager 에 public GameObject Instantiate(string path, Transform parent = null)를 만들었잖아요? 그런데 PrefabTest에서 사용할 때 tank = Managers.Resource.Instantiate("Tank")를 사용했는데 위에서는 Instantiate(인자1, 인자2) 이고 뒤에 사용한것은 Instantiate(인자1) 이잖아요? 그럼 ResourceManager 에 있는 우리가 만든 Instantiate는 작동하지 않은게 아닌가요? Instantiate()의 인자안의 Transform parent = null) Transform parent = null은 왜 한 것일까요?? 그리고 Transform 이라는 타입은 무엇인가요?? Transform 은 위치를 설정할 때 사용하는 거라고 생각하고있었는데 타입으로 나오니 무엇인지 잘 모르겠습니다..

  • unity
  • C#
기요미지후니 댓글 1 좋아요 0 조회수 372

1:52 typeid() 리터럴의 데이터타입 출력

해결됨

홍정모의 따라하며 배우는 C++

저 같은 경우 한 글자만 출력이 되는데, 예를 들어 Int는 i 이 부분을 바꿀 수 있나요 ? 코드는 아래와 같습니다. #include <iostream> #include <typeinfo> int main() { using namespace std; int a = 123; cout << typeid(a).name() << endl; return 0; }

  • 형변환
  • 데이터타입
  • C++
볼록볼록한 랫서팬더 댓글 1 좋아요 1 조회수 615

go_router.dart error(auth_provider내 redirectLogic)

미해결

[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!

auth_provider.dart내에서 redirectLogin 추가하고 이런 에러가 나와서요 아무리 소스코드를 확인해봐도.. type에러인것 같긴한데.. 부탁드립니다. String? redirectLogic(GoRouterState state) { final UserModelBase? user = ref.read (userMeProvider); ========================================================== lib/common/provider/go_router.dart:14:24: Error: The argument type 'String? Function(GoRouterState)' can't be assigned to the parameter type 'FutureOr<String?> Function(BuildContext, GoRouterState)?'. - 'GoRouterState' is from 'package:go_router/src/state.dart' ('../../Libraries/flutter/.pub-cache/hosted/pub.dartlang.org/go_router-5.2.4/lib/src/state.dart'). - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../Libraries/flutter/packages/flutter/lib/src/widgets/framework.dart'). go_router.dart import 'package:actual/user/provider/auth_provider.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; final routerProvider = Provider<GoRouter>((ref) { // watch - 값이 변경될때마다 다시 빌드 // read - 한번만 읽고 값이 변경돼도 다시 빌드하지 않음 final provider = ref.read(authProvider); return GoRouter( routes: provider.routes, initialLocation: '/splash', refreshListenable: provider, redirect: provider.redirectLogic, ); });

  • Flutter
  • 하이브리드 앱
Alex Kwon 댓글 4 좋아요 0 조회수 1066

백준 4179번 질문

미해결

10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트

안녕하세요 백준 4179번 문제 풀다가 질문 생겨 글 올립니다. 다음과 같이 짰는데, 71퍼에서 틀리다고 나옵니다. 선생님과는 코드가 약간 다른데, 어느 부분이 문제인지 알 수 있을까요? http://boj.kr/83400fc70dfb44e3bca63cb9ca90f93d

  • 코테 준비 같이 해요!
  • C++
bunny 댓글 1 좋아요 0 조회수 339

질문사항입니다. redux saga 흐름 관련

미해결

[리뉴얼] React로 NodeBird SNS 만들기

안녕하세요 제가 정보수정이라는 간단한 기능을 구현중인데... 이 강의 데이터 흐름 구조를 쓰고 있습니다. (next redux saga dispatch) 본론으로 들어가서 TEXT 해당 링크를 클릭하면 정보수정 pages - 정보수정페이지 로 이동하는데 이동해서 useEffect 함수 안에 dispatch 날려서 해당 회원 정보를 select 해서 가지고 옵니다. const {userInfo} = useSelector((state) => state.user); 그런데 const [userid, onChangeUserid] = useInput(userInfo.userid); 이런식으로 ....등등 해당 값은 잘 가지고 오는데 문제가 값을가지고 오기 까지 딜레이 때문에 useInput 에 userInfo. 데이터를 넣질 못해요... useInput(userInfo?.userid || '' ) if(userInfo) { } 등등 별거 다 해봤는데 .. 해당 값이 useInput에 처음 들어간 값 대로만 반영하는 것 같아서 .. 해당 값을 userInput에 집어넣어지지 않네요..;; 어떻게 해야 하나요? asyac, await 같이 비동기를 잡아주는 개념이 있을까요?

  • react
  • nodejs
  • express
  • redux
  • Next.js
ts 댓글 1 좋아요 0 조회수 252

AppConfig 구성영역 질문

미해결

스프링 핵심 원리 - 기본편

학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] AppConfig에 이렇게 작성을하면 OrderService는 인터페이스고 new OrderServiceimple은 implement 상속받는 클래스 인데 new OrderServiceimpl 이 부분이 OrderService 중 OrderServiceimpl 이라는 이름으로 상속받으면 memberRepository() 와 discountPolicy() 객체를 주입한다 이렇게 해석해도 되는걸까요 ??

  • spring
  • oop
ddNewB 댓글 1 좋아요 0 조회수 448

k-fold 교차 검증 부분 질문 드립니다!

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

안녕하세요! 강의 너무 재밌게 잘 보고 있습니다! k-fold 교차검증 부분 듣다가 스크린샷 코드에 궁금한 점이 있어서 질문드립니다! 스크린샷 처럼 StratifiedKFold.split() 을 이용해서 데이터를 나누고 for문으로 직접 K-fold 방식을 수행할 때, dt_clf 모델이 for문의 이전 iteration에 수행한 학습을 누적해서 학습을 하는거 같은데 이렇게 하는게 맞는 것인지 궁금합니다. 제 생각엔 0번 iter 수행 후 dt_clf 값 초기화, 1번 iter 수행 후 dt_clf 값 초기화, ... 4번까지. 이렇게 수행되어야 한 K-fold 수행 내에서 "학습에 사용한 데이터로 validation" 하는 것을 방지할 수 있을 것 같습니다. 물론 같은 데이터로 여러 epoch을 수행하면 어차피 학습한 데이터가 누적해서 validation으로 사용될 것 같기도 한데... 어떤거 맞는 방법인지 실제 코드는 어떻게 수행되는지 설명 부탁 드립니다. 또한, 아래에 나오는 cross_val_score() 함수, GridSearchCV() 함수 에서는 어떻게 수행하는지 알려주시면 감사하겠습니다. 좋은 강의 감사합니다!

  • k-fold
  • python
  • 머신러닝 배워볼래요?
  • 통계
진희상 댓글 1 좋아요 0 조회수 665

인기 태그

인프런 TOP Writers

주간 인기글