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

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. 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. 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. 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.
    在这里插入图片描述

{ 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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值