본문 바로가기
728x90
반응형

Python286

[ML] Classic Regressor (Summary) - regression DeepLearning 계열을 제외한 Regressor 모델들을 간단하게 정리함.https://gist.github.com/dsaint31x/1c9c4a27e1d841098a9fee345363fa59 ML_Regressor_Summary.ipynbML_Regressor_Summary.ipynb. GitHub Gist: instantly share code, notes, and snippets.gist.github.com분류Instance Based AlgorithmK Neighbors RegressionModel Based AlgorithmLinear ModelLinear RegressionRegularizationRidge RegressionLasso RegressionElasticNetNon-Line.. 2024. 10. 2.
[Py] Debug: Error and Exception. 1. ExceptionPython의 모든 (다룰 수 있는) 예외(Exception)의 상위 클래스.Exception: 영어로 “예외”, “특별한 경우”, 또는 “일반 규칙에서 벗어난 것”을 의미. Python 프로그램에서 예외(exception)는정상적인 흐름에서 벗어난 상황을 뜻하며,반드시 Error(명백한 코드의 오류)를 의미하지는 않음.개발자가 처리할 수 있는 예외(exception)는 Exception 클래스로 추상화,이를 포함한 모든 예외는 BaseException 클래스로 추상화 (이 문서의 아래 참고할 것)앞서 언급한 Error 가 아닌 예외(exception)에는Warning계열이나 Critical Exception (Keyboard Interrupt나 SystemExit) 등이 있음.예외.. 2024. 9. 25.
[Py] Debugging: pdb and ipdb pdb (Python DeBugger)는 Python 표준 라이브러리에 포함된 기본 디버거이고 ipdb (IPython DeBugger)는 pdb를 기반으로 IPython의 기능을 결합한 확장 디버거임.참고로 debugpy 는 vscode에서 python debugging을 위해 제공되는 디버거임 (vscode에서 기본으로 사용) Python 개발시 사용되는 도구로,다음에 소개되는 명령들을 통해코드를 한 줄씩 실행하거나특정 위치에서 프로그램을 멈추고 디버깅할 수 있음.pdb와 ipdb는 기본적으로 CLI tool임. python의 기본 shell을 보강한 ipython의 관계처럼,Syntax Highlighting이나, 셀명령어 실행, 자동완성 등의 기능을 보강한 ipdb가 보다 많이 사용됨 (별도 설치.. 2024. 9. 25.
[Py] assert 구문 (statement) 디버깅에서 assert는 프로그램의 특정 조건이 참인지 확인하는 데 사용되는 statement(구문).assert는주어진 조건이 참(True)일 때는 아무런 영향을 미치지 않지만,조건이 거짓(False)일 경우 프로그램을 중단하고 AssertionError를 발생시킴.assert의 주요 목적은 코드 실행 중 특정 조건이 반드시 충족되어야 함을 확인하는 것.이를 통해 디버깅 단계에서 잠재적인 오류나 논리적 문제를 빠르게 발견할 수 있음: "fast-failing"을 통해 개발과정에서 버그를 줄이는데 사용됨. Assertions는 일종의 sanity check (정상성 검사)로서,개발과정 중에만 사용되며, 반드시 일어나서는 안되는 오류를 개발과정에서 제거하기 위해서임.AssertionError는 개발 과정 .. 2024. 9. 24.
[CV] cv2.calibrateCamera cv2.calibrateCamerahttps://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#ga3207604e4b1a1758aa66acb6ed5aa65d OpenCV: Camera Calibration and 3D ReconstructionThe functions in this section use a so-called pinhole camera model. The view of a scene is obtained by projecting a scene's 3D point \(P_w\) into the image plane using a perspective transformation which forms the corresponding pixel \(p\). B.. 2024. 9. 22.
[Etc] SW Version: Semantic Versioning + packaging.version 1. Semantic Versioning SystemSemantic Versioning (SemVer) 시스템에 따라,소프트웨어에서 major와 minor, patch (or micro) 버전을 구분하여 버전을 매김.Python에서는 PEP 440 에서 버전 표기 방식을 지정하고 있으며 SemVer와 거의 유사함.이는 버전 번호를 MAJOR.MINOR.PATCH 형식으로 표현.MAJOR 버전:이전 버전과 호환되지 않는 API 변경이 있을 때 증가.큰 기능 변경이나 구조적 변화가 있을 때 증가.MINOR 버전:이전 버전과 호환되는 새로운 기능을 추가할 때 증가.기존 기능의 개선이나 작은 변경사항이 있을 때 증가.3. PATCH 버전 (or Micro 버전):버그 수정이나 성능 개선과 같은 작은 변경사항이 .. 2024. 9. 19.
728x90
반응형