线性判别分析仅在线性可分数据上能获得理想结果

Q: 线性判别分析仅在线性可分数据上能获得理想结果, 试设计一个改进方法, 使其能较好地用于飞线性可分数据

The same for “Linear discriminant analysis can only obtain ideal results on linearly separable data. Try to design an improved method to make it better used for flying linearly separable data” maybe translate from website, and I don’t know its truth yeah

Today I’d like to talk about another way for the problem above to resolve. So let’s go to the point.

Using the “Piecewise linear function” is a really good way for me to resolve it maybe it’s wrong, and please give me some pull requests or issues. Thanks a lot

  1. To start with, let’s talk about the problem how to use a linear curve to divide the dots into 2 parts(the reds and blues). Obviously, on way.

线性判别分析仅在线性可分数据上能获得理想结果_第1张图片

  1. Secondly, let’s just use a green curve like the picture below to divide it. However it’s wrong, because it’s not a linear function. Maybe it’s called Quadratic equation, Cubic equation or some others(you know I mean some parts of those functions).
    线性判别分析仅在线性可分数据上能获得理想结果_第2张图片

  2. As you can see, I make up a lot of brown lines perpendicular to X-axis. Let’s name the distance between one line and the next Δ d \Delta d Δd. Maybe Δ d \Delta d Δd is not really normal or standard, but all the distances are the same.
    线性判别分析仅在线性可分数据上能获得理想结果_第3张图片

  3. The for the first part (I mean from one brown curve to the next) we can easily use a linear function to divide the dots into to 2 parts(up and down). By the way, pls take care of the range(x or y’s value range). They are just like many many funtions here.
    线性判别分析仅在线性可分数据上能获得理想结果_第4张图片

{ y 1 = w 1 T x 1 + b 1 ( − 0.5 < x ≤ 0.5 + Δ d ) y 2 = w 2 T x 2 + b 2 ( 0.5 + Δ d < x ≤ 0.5 + Δ d ∗ 2 ) y 3 = w 3 T x 3 + b 3 ( 0.5 + Δ d ∗ 2 < x ≤ 0.5 + Δ d ∗ 3 ) . . . y n = w n T x n + b n ( 0.5 + Δ d ∗ ( n − 1 ) < x ≤ 0.5 + Δ d ∗ n ) \left\{ \begin{matrix} y_1=w_1^Tx_1+b_1 \quad (-0.5 < x \leq 0.5+\Delta d)\\ y_2=w_2^Tx_2+b_2 \quad (0.5+\Delta d < x \leq 0.5+\Delta d*2)\\ y_3=w_3^Tx_3+b_3 \quad (0.5+\Delta d*2 < x \leq 0.5+\Delta d*3)\\ .\\ .\\ .\\ y_n=w_n^Tx_n+b_n \quad (0.5+\Delta d*(n-1) < x \leq 0.5+\Delta d*n)\\ \end{matrix} \right. y1=w1Tx1+b1(0.5<x0.5+Δd)y2=w2Tx2+b2(0.5+Δd<x0.5+Δd2)y3=w3Tx3+b3(0.5+Δd2<x0.5+Δd3)...yn=wnTxn+bn(0.5+Δd(n1)<x0.5+Δdn)

As you can see, -0.5 is not the real value in all the situations, and it’s up to the x value range for the datasets. You can chose a super small x value, but that will be cost more.

  1. Let’s do a little bit small test.

So, there is a test data from the test datasets(the orange dot). Then we just look for the x value, use the binary search from -0.5(usually not) to Δ d \Delta d Δd *n, check the dot if it exist up or down.

  1. Lastly, done. However maybe it has something wrong or others’ error, please pull any issuses, and I’m pleased to reply and resolve them. Thank you all again. Best wishes.

solve them. Thank you all again. Best wishes.

你可能感兴趣的:(线性回归)