기본 콘텐츠로 건너뛰기

[ML] 결정트리(Decision Tree) 모델

[Math classic] Calculus Made Easy CH.2

CHAPTER II.

ON DIFFERENT DEGREES OF SMALLNESS.

We shall find that in our processes of calculation we have to deal with small quantities of various degrees of smallness.
We shall have also to learn under what circumstances we may con- sider small quantities to be so minute that we may omit them from consideration. Everything depends upon relative minuteness.
Before we fix any rules let us think of some familiar cases. There are 60 minutes in the hour, 24 hours in the day, 7 days in the week. There are therefore 1440 minutes in the day and 10080 minutes in the week.
Obviously 1 minute is a very small quantity of time compared with a whole week. Indeed, our forefathers considered it small as compared with an hour, and called it “one minùte,” meaning a minute fraction—namely one sixtieth—of an hour. When they came to require still smaller subdivisions of time, they divided each minute into 60 still smaller parts, which, in Queen Elizabeth’s days, they called “second minùtes” (i.e. small quantities of the second order of minuteness). Nowadays we call these small quantities of the second order of smallness “seconds.” But few people know why they are so called.
Now if one minute is so small as compared with a whole day, how much smaller by comparison is one second!
Again, think of a farthing as compared with a sovereign: it is barely worth more than $\frac{1}{1000}$ part. A farthing more or less is of precious little importance compared with a sovereign: it may certainly be regarded as a small quantity. But compare a farthing with £1000: relatively to this greater sum, the farthing is of no more importance than $\frac{1}{1000}$ of a farthing would be to a sovereign. Even a golden sovereign is relatively a negligible quantity in the wealth of a millionaire.
Now if we fix upon any numerical fraction as constituting the pro- portion which for any purpose we call relatively small, we can easily state other fractions of a higher degree of smallness. Thus if, for the purpose of time, $\frac{1}{60}$ be called a small fraction, then $\frac{1}{60}$ of $\frac{1}{60}$ (being a small fraction of a small fraction) may be regarded as a small quantity of the second order of smallness.[1]
Or, if for any purpose we were to take 1 per cent. (i.e. 1/100 as a small fraction, then 1 per cent. of 1 per cent. $\frac{1}{10,000}$ would be a small fraction of the second order of smallness; and $\frac{1}{1,000,000}$ would be a small fraction of the third order of smallness, being 1 per cent. of 1 per cent. of 1 per cent.
Lastly, suppose that for some very precise purpose we should regard $\frac{1}{1,000,000}$ as “small.” Thus, if a first-rate chronometer is not to lose or gain more than half a minute in a year, it must keep time with an accuracy of 1 part in 1,051,200. Now if, for such a purpose, we regard $\frac{1}{1,000,000}$ (or one millionth) as a small quantity, then will be a small quantity $\frac{1}{1,000,000}$ of $\frac{1}{1,000,000}$ (or one billionth) will be a small quantity of the the second order of smallness, and may be utterly disregarded, by comparison.
Then we see that the smaller a small quantity itself is, the more negligible does the corresponding small quantity of the second order become. Hence we know that in all cases we are justified in neglecting the small quantities of the second—or third (or higher)—orders, if only we take the small quantity of the first order small enough in itself.
But, it must be remembered, that small quantities if they occur in our expressions as factors multiplied by some other factor, may become important if the other factor is itself large. Even a farthing becomes important if only it is multiplied by a few hundred.
Now in the calculus we write dx for a little bit of x. These things such as dx, and du, and dy, are called “differentials,” the differential of x, or of u, or of y, as the case may be. [You read them as dee-eks,or dee-you, or dee-wy.] If dx be a small bit of x, and relatively small of itself, it does not follow that such quantities as x · dx, or $x^2dx$, or a x dx, are negligible. But $dx \times dx$ would be negligible, being a small quantity of the second order.
A very simple example will serve as illustration.
Let us think of x as a quantity that can grow by a small amount so as to become x + dx, where dx is the small increment added by growth. The square of this is $x^2 + 2x·dx + (dx)^2$. The second term is not negligible because it is a first-order quantity; while the third term is of the second order of smallness, being a bit of, a bit of x2. Thus if we took dx to mean numerically, say, $\frac{1}{60}$ of x, then the second term would be $\frac{2}{60}$ of $x^2$ , whereas the third term would be $\frac{1}{3600}$ of $x^2$. This last term is clearly less important than the second. But if we go further and take dx to mean only $\frac{1}{1000}$ of x, then the second term will be $\frac{2}{1000}$, while the third term will be only $\frac{1}{1,000,000}$ of $x^2$ .
FIG. 1.
Geometrically this may be depicted as follows: Draw a square (Fig. 1) the side of which we will take to represent x. Now suppose the square to grow by having a bit dx added to its size each way. The enlarged square is made up of the original square $x^2$ , the two rectangles at the top and on the right, each of which is of area x·dx(or together 2x·dx), and the little square at the top right-hand corner which is $(dx)^2$. In Fig. 2 we have taken dx as quite a big fraction of x—about $\frac{1}{5}$. But suppose we had taken it only $\frac{1}{100}$—about the thickness of an inked line drawn with a fine pen. Then the little corner square will have an area of only $\frac{1}{10,000}$ of $x^2$, and be practically invisible. Clearly $(dx)^2$ is negligible if only we consider the increment dx to be itself small enough.
Let us consider a simile.
FIG. 2.

FIG. 3.
Suppose a millionaire were to say to his secretary: next week I will give you a small fraction of any money that comes in to me. Suppose that the secretary were to say to his boy: I will give you a small fraction of what I get. Suppose the fraction in each case to be $\frac{1}{100}$ part. Now if Mr. Millionaire received during the next week £1000, the secretary would receive £10 and the boy 2 shillings. Ten pounds would be a small quantity compared with £1000; but two shillings is a small small quantity indeed, of a very secondary order. But what would be the disproportion if the fraction, instead of being $\frac{1}{100}$, had been settled at $\frac{1}{100}$ part? Then, while Mr. Millionaire got his £1000, Mr. Secretary would get only £1, and the boy less than one farthing!
The witty Dean Swift[2] once wrote:
“So, Nat’ralists observe, a Flea
“Hath smaller Fleas that on him prey.
“And these have smaller Fleas to bite ’em,
“And so proceed ad infinitum.”
An ox might worry about a flea of ordinary size—a small creature of the first order of smallness. But he would probably not trouble himself about a flea’s flea; being of the second order of smallness, it would be negligible. Even a gross of fleas’ fleas would not be of much account to the ox.



[1] The mathematicians talk about the second order of “magnitude” (i.e. greatness) when they really mean second order of smallness. This is very confusing to beginners.
[2]On Poetry: a Rhapsody (p. 20), printed 1733—usually misquoted.

댓글

이 블로그의 인기 게시물

[Linear Algebra] 유사변환(Similarity transformation)

유사변환(Similarity transformation) n×n 차원의 정방 행렬 A, B 그리고 가역 행렬 P 사이에 식 1의 관계가 성립하면 행렬 A와 B는 유사행렬(similarity matrix)이 되며 행렬 A를 가역행렬 P와 B로 분해하는 것을 유사 변환(similarity transformation) 이라고 합니다. $$\tag{1} A = PBP^{-1} \Leftrightarrow P^{-1}AP = B $$ 식 2는 식 1의 양변에 B의 고유값을 고려한 것입니다. \begin{align}\tag{식 2} B - \lambda I &= P^{-1}AP – \lambda P^{-1}P\\ &= P^{-1}(AP – \lambda P)\\ &= P^{-1}(A - \lambda I)P \end{align} 식 2의 행렬식은 식 3과 같이 정리됩니다. \begin{align} &\begin{aligned}\textsf{det}(B - \lambda I ) & = \textsf{det}(P^{-1}(AP – \lambda P))\\ &= \textsf{det}(P^{-1}) \textsf{det}((A – \lambda I)) \textsf{det}(P)\\ &= \textsf{det}(P^{-1}) \textsf{det}(P) \textsf{det}((A – \lambda I))\\ &= \textsf{det}(A – \lambda I)\end{aligned}\\ &\begin{aligned}\because \; \textsf{det}(P^{-1}) \textsf{det}(P) &= \textsf{det}(P^{-1}P)\\ &= \textsf{det}(I)\end{aligned}\end{align} 유사행렬의 특성 유사행렬인 두 정방행렬 A와 B는 'A ~ B' 와 같

[matplotlib] 히스토그램(Histogram)

히스토그램(Histogram) 히스토그램은 확률분포의 그래픽적인 표현이며 막대그래프의 종류입니다. 이 그래프가 확률분포와 관계가 있으므로 통계적 요소를 나타내기 위해 많이 사용됩니다. plt.hist(X, bins=10)함수를 사용합니다. x=np.random.randn(1000) plt.hist(x, 10) plt.show() 위 그래프의 y축은 각 구간에 해당하는 갯수이다. 빈도수 대신 확률밀도를 나타내기 위해서는 위 함수의 매개변수 normed=True로 조정하여 나타낼 수 있다. 또한 매개변수 bins의 인수를 숫자로 전달할 수 있지만 리스트 객체로 지정할 수 있다. 막대그래프의 경우와 마찬가지로 각 막대의 폭은 매개변수 width에 의해 조정된다. y=np.linspace(min(x)-1, max(x)+1, 10) y array([-4.48810153, -3.54351935, -2.59893717, -1.65435499, -0.70977282, 0.23480936, 1.17939154, 2.12397372, 3.0685559 , 4.01313807]) plt.hist(x, y, normed=True) plt.show()

R 미분과 적분

내용 expression 미분 2차 미분 mosaic를 사용한 미분 적분 미분과 적분 R에서의 미분과 적분 함수는 expression()함수에 의해 생성된 표현식을 대상으로 합니다. expression expression(문자, 또는 식) 이 표현식의 평가는 eval() 함수에 의해 실행됩니다. > ex1<-expression(1+0:9) > ex1 expression(1 + 0:9) > eval(ex1) [1] 1 2 3 4 5 6 7 8 9 10 > ex2<-expression(u, 2, u+0:9) > ex2 expression(u, 2, u + 0:9) > ex2[1] expression(u) > ex2[2] expression(2) > ex2[3] expression(u + 0:9) > u<-0.9 > eval(ex2[3]) [1] 0.9 1.9 2.9 3.9 4.9 5.9 6.9 7.9 8.9 9.9 미분 D(표현식, 미분 변수) 함수로 미분을 실행합니다. 이 함수의 표현식은 expression() 함수로 생성된 객체이며 미분 변수는 다음 식의 분모의 변수를 의미합니다. $$\frac{d}{d \text{변수}}\text{표현식}$$ 이 함수는 어떤 함수의 미분의 결과를 표현식으로 반환합니다. > D(expression(2*x^3), "x") 2 * (3 * x^2) > eq<-expression(log(x)) > eq expression(log(x)) > D(eq, "x") 1/x > eq2<-expression(a/(1+b*exp(-d*x))); eq2 expression(a/(1 + b * exp(-d * x))) > D(eq2, "x") a * (b * (exp(-d * x) * d))/(1 + b