capDoYeonLee / gis_deep_file

0 stars 0 forks source link

Deep Learning Q&A #1

Open capDoYeonLee opened 2 years ago

capDoYeonLee commented 2 years ago

그냥 딥러닝 공부하다가 모르는것들 정리

Q. What are the differences between 'epoch', 'batch', and 'minibatch'?

A. As far as I know, when adopting Stochastic Gradient Descent as learning algorithm, someone use 'epoch' for full dataset, and 'batch' for data used in a single update step, while another use 'batch' and 'minibatch' respectively, and the others use 'epoch' and 'minibatch'. This brings much confusion while discussing.

Q. what is the puspose of dropout in a neural network?

A. Dilution (also called Dropout) is a regularization technique for reducing overfitting in artificial neural networks by preventing complex co-adaptations on training data. It is an efficient way of performing model averaging with neural networks. The term dilution refers to the thinning of the weights.

Q. why we use loss function?

A. for example our final goal is accuracy, but why we select loss function? it is the role of differentiation. when we find optimized weight and bias in neural networks, we find as possible smaller than weight and bias as

Q. data를 종폭시키면(over sampling), 증폭시킨 data는 실제 data가 아니지 않나?

A. 데이터가 지금처럼 불균형하게 수집되었을때 이 데이터를 가지고 학습을 시켜야 하는 경우는 꽤나 많다. 그럼 당연하게도 성능이나 평가가 잘 이루어지지 않는다. 그래서 지금처럼 데이터를 증폭시켜주는 기법을 오버 샘플링 이라고 하는 기법을 사용하여 신경망의 성능을 올리는 방식을 취해준다. 단 무조건 이 방식처럼 데이터를 늘려주는건 아니고, 중간중간에 이상치가 섞인 데이터를 넣어줌으로써 성능을 더욱 올려줄 수 있습니다. 우리의 제 1 목표는 신경망의 성능을 높이는거다. 그래서 이러한 방식 또한 자주 사용한다

Q. 이상치 data를 넣어줌으로써 어떻게 성능을 올리수 있나? 이상치data가 있기 때문에 min-max, z-score정규화 방식을 사용하는게 아닌가?

A. 같은 data를 반복해서 사용하는 것 보다 중간중간 다른 데이터를 넣어줌으로써 편향을 막아주고 성능을 올려준다. 정규화를 해주는 이유는 데이터의 균형을 맞추기 위함이다. 근데 이상치를 허용범위 내로 만든다면 성능이 높아질 가능성은 충분하다.

Q. 분명 증폭시킨(over sampling)data가 어떻게 실제 data 역할을 하는지? 아니면 어차피 현재 가지고 있는 data로는 신경망 성능이 한계가 있으니까, data를 중폭시켜(오버 샘플링) 신경망의 성능을 좋게 하는건지??

A. 이건 관점을 달리 볼 필요가 있다. 애초에 data의 불균형이 가져다준 문제들을 풀기 위한 방법이라 생각하라 (어차피 현재 data로는 한계가 있으니 data증폭시켜 신경망 성능 좋게하자) 이런 관점으로 접근해라

Q. minibatch훈련은 데이터로부터 일부만 골라 학습을 수행한다. dropout기법도 어떻게 보면 입력 data가 신경망으로 들어가 은닉층을 줄여주는 역할을 한다. 그럼 이 두방식은 비슷한가?

A. 개념이 다르다. 우선 minibatch로는 전체 학습 data를 한번에 학습하는게 아니다. 예시로 100개가 있다면 10개씩 10개씩 나누면서 학습을 시킨다. 이게 minibatch학습이다. 다음으로 dropout은 은칙층에 일부 노드를 사용하지 않는 방식으로 과적합을 줄여주는 역할이다. 이렇게 개념을 정립하자.

Q. sigmoid식과 cee식을 합쳐서 사용하는데 합치지 않고 따로 사용이 가능한가?

A. 가능하다 sigmoid 값에서 나온 확률분포와 실제 정답의 확률분포를 cee에 넣어주면 된다. 하지만 연산의 속도는 차이가 있을거다

Q. What is oversampling in data minig??

A. Oversampling uses imitation or synthetic techniques to increase the number of minority class samples to equal the number of majority class samples.

Q. What is undersampling in data mining??

A. ndersampling mainly reduces the data amount in the majority class to balance with the minority class.

.

capDoYeonLee commented 2 years ago

CEE and sigmoid 모르는 것들 정리

Q. why are you changing it to the next formula?

-x -xz + log(1+exp(-x))

A. 이 식 같은 경우에는 시그모이드와 교차 엔트로피를 한꺼번에 수행하여 손실함수값을 바로 구해주는 수식이다.

Q. what is the purpose of differentiated cross entrophy?

-z + sigmoid(x)

A. 대체로 미분으로 나온 도함수의 사용 용도는 미분된 결과값을 바탕으로 역전파를 구현할 때 사용하곤 한다 이전 시간에 역전파를 위해 mse를 미분한 것 처럼 이 손실함수 또한 미분된 값이 필요하다.

Q. why is used to sigmoid and cross entropy??

A. For "Sigmoid" function output is [0,1], for binary classification we check if output >0.5 then class 1, else 0. This clearly follows the concept of using binary cross entropy as the out is only two values that is binary.

Q. why do we use cross entrophy??

A. Cross-entropy is commonly used in machine learning as a loss function. Cross-entropy is a measure from the field of information theory ,building upon entropy and generally calculating the difference between two probability distributions.

Q. What is the puspose of cross entrophy??

A. Overall, as we can see the cross-entropy is simply a way to measure the probability of a model. The cross-entropy is useful as it can describe how likely a model is and the error function of each data point.
It can also be used to describe a predicted outcome compare to the true outcome.

Q. What is Cross entrophy used for??

A. Cross entropy is commonly used to quantify the difference between two probability distributions. it is a measure of error for categorical multi-clsss classification problems

capDoYeonLee commented 2 years ago

image

Q. 위 코드에서 mb_size, mini_batch_step_count의 역할은 무엇인가??

A. 우선 100개의 학습 데이터가 있을 때 하나의 미니배치에 10개의 데이터를 할당시켜 준다면 미니배치는 총 몇 개가 나오게 될까? 그럼 10개의 미니배치가 생성된다. 이때 이 미니배치의 개수가 mini_batch_step_count 변수가 된다. 그리고 1개의 미니배치에 몇 개의 데이터가 들어가는지 설정해 주는 변수가 mb_size 입니다.