PYTHON

포스트: 124|조회수: 0|TERM
Items

Posts

124 posts

가장 쉬운 변수 공유 (클래스를 활용한 변수 공유) [Python]

가장 쉬운 변수 공유 (클래스를 활용한 변수 공유) [Python] 포트란 77의 common 문 사용과 같이 특정 변수들을 한 곳에 모아 두고 다른 서브루틴들이 특정 무리 변수들을 활용할 수 있게 할 수 있다. 변수들의 종류별로 사용자가 이름을 붙인 common 문을 선언하면 보다 더 구체적인 변수 무리들을 별도로 관리할 수 있다. 또한, 이들 common 문을 별도의 파일 속에 넣고 파일로 저장할 수 있다.특정 변수들이 필요한 경우 그 파일을 include 하는 방식으로 프로그램을 편집할 수 있다. 이렇게 전체 프로그램을 관리할 수 있다. 이렇게 할 경우, 흩어져 있을 수 있는 common 문 변수들이 완전히 동일하게 편집된다.강제적으로 동일한 하나의 내용물이 되게할 수 있다. 즉, 꼭 필요한 서브루틴

가장 쉬운 denoising autoencoder

가장 쉬운 Denoising autoencoder 노이즈를 없애버리는 autoencoder, denoising autoencoder autoencoder의 변형으로 denosing autoencoder를 생각할 수 있다.아래의 왼쪽의 오염된 문서를 오른쪽의 문서로 변환하는 식으로 응용될 수 있다. denoising autoencoder 는 x-->x 가 아니라 x' --> x 가 되도록 훈련한 것. 여기서 x'은 노이즈를 가지고 있는 객체이다. 노이즈를 업애는 작업을 훈련시킬 수 있다.x'--> x가 되는 훈련을 시키면 된다. autoencoder: # get MNISTimport numpy as npfrom keras.datasets import mnist(x_t

가장 쉬운 드랍아웃 [Keras]

가장 쉬운 드랍아웃 [Keras] 딥러닝에서 과적합(overfitting)을 피할 수 있는 방법으로서 드랍아웃 방법이 아주 유명하다. https://en.wikipedia.org/wiki/Dropout_(neural_networks)https://en.wikipedia.org/wiki/Regularization_(mathematics)https://machinelearningmastery.com/dropout-regularization-deep-learning-models-keras/https://machinelearningmastery.com/how-to-reduce-overfitting-with-dropout-regularization-in-keras/http://incredible.egloos.com

가장 쉬운 LightGBM 모델 [분류, 회귀]

가장 쉬운 LightGBM 모델 [분류, 회귀]https://lightgbm.readthedocs.io/en/latest/https://github.com/microsoft/LightGBMhttps://www.programcreek.com/python/example/88792/lightgbm.Dataset --------------------------------------------------------------------------------------------------------------------- import lightgbm as lgb from bayes_opt import BayesianOptimization from sklearn.model_selection import cr