Fisher非线性分类器 核函数 10C

3个回答

m1=mean(w1)';
m2=mean(w2)';
%s1、s2分别代表表示第一类、第二类样本的类内离散度矩阵
s1=zeros(2);
[row1,colum1]=size(w1);
for i=1:row1
s1 = s1 + (w1(i,:)'-m1)*(w1(i,:)'-m1)';
end;
s2=zeros(2);
[row2,colum2]=size(w2);
for i=1:row2
s2 = s2 + (w2(i,:)' - m2)*(w2(i,:)' - m2)';
end;
%计算总类内离散度矩阵Sw
Sw=s1+s2;
%计算fisher准则函数取极大值时的解w
w=inv(Sw)*(m1-m2);
%计算阈值w0
ave_m1 = w'*m1;
ave_m2 = w'*m2;
w0 = (ave_m1+ave_m2)/2;
%画出两类训练样本点
figure(1)
plot(X1,Y1,'.r',X2,Y2,'.b');%画出两类样本点
hold on;grid;
%画出取极大值时的解w
x = [-40:0.1:40];
y = x*w(2)/w(1);
plot(x,y,'g')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%以下为测试部分
%利用ginput随机选取屏幕上的点（可连续取10个点）
%程序可根据点的位置自动地显示出属于那个类
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=1:10
[x,y]=ginput(1);
plot(x,y,'m*');
sample=[x,y];
hold all
if(sample*w - w0>0)
disp('it belong to the first class');
else
disp('it belong to the second class');
end;
end

【求助】用matlab自带的classify函数对数据进行处理
http://cn.mathworks.com/help/stats/classify.html官网的代码想修改成我自己的数据进行测试，求指导 代码 load fisheriris SL = meas(51:end,1); SW = meas(51:end,2); group = species(51:end); h1 = gscatter(SL,SW,group,'rb','v^',[],'off'); set(h1,'LineWidth',2) legend('Fisher versicolor','Fisher virginica',... 'Location','NW') [X,Y] = meshgrid(linspace(4.5,8),linspace(2,4)); X = X(:); Y = Y(:); [C,err,P,logp,coeff] = classify([X Y],[SL SW],... group,'Quadratic'); hold on; gscatter(X,Y,C,'rb','.',1,'off'); K = coeff(1,2).const; L = coeff(1,2).linear; Q = coeff(1,2).quadratic; % Function to compute K + L*v + v'*Q*v for multiple vectors % v=[x;y]. Accepts x and y as scalars or column vectors. f = @(x,y) K + [x y]*L + sum(([x y]*Q) .* [x y], 2); h2 = ezplot(f,[4.5 8 2 4]); set(h2,'Color','m','LineWidth',2) axis([4.5 8 2 4]) xlabel('Sepal Length') ylabel('Sepal Width') title('{\bf Classification with Fisher Training Data}')

![图片说明](https://img-ask.csdn.net/upload/201908/12/1565613050_565691.png) 51%|████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 199/391 [00:38<00:21, 8.81it/s]2019-08-12 20:20:04.963304: I tensorflow/core/kernels/cuda_solvers.cc:159] Creating CudaSolver handles for stream 0000016EAC1D0A40 2019-08-12 20:20:05.763636: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 85505 for batch index 0, expected info = 0. Debug_info = heevd ** On entry to SGEMM parameter number 10 had an illegal value 2019-08-12 20:20:06.320473: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 5236925 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:06.328931: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 1871 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:06.838588: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 687520 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:06.850771: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 321 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:06.999345: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 42770 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:07.499292: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 1497278 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:07.510245: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 321 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:08.020011: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 256112 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:08.529828: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 341471 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:08.540870: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 16833 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:08.697339: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 1190 for batch index 0, expected info = 0. Debug_info = heevd Traceback (most recent call last): File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1334, in _do_call return fn(*args) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1319, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1407, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: Got info = 85505 for batch index 0, expected info = 0. Debug_info = heevd [[{{node KFAC/SelfAdjointEigV2_10}}]] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "main.py", line 67, in <module> main() File "main.py", line 63, in main trainer.train() File "E:\python代码\noisy-K-FAC\noisy-K-FAC\core\train.py", line 16, in train self.train_epoch() File "E:\python代码\noisy-K-FAC\noisy-K-FAC\core\train.py", line 42, in train_epoch self.sess.run([self.model.inv_update_op, self.model.var_update_op], feed_dict=feed_dict) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 929, in run run_metadata_ptr) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1152, in _run feed_dict_tensor, options, run_metadata) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1328, in _do_run run_metadata) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1348, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: Got info = 85505 for batch index 0, expected info = 0. Debug_info = heevd [[node KFAC/SelfAdjointEigV2_10 (defined at E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\utils.py:161) ]] Caused by op 'KFAC/SelfAdjointEigV2_10', defined at: File "main.py", line 67, in <module> main() File "main.py", line 60, in main model_ = Model(config, _INPUT_DIM[config.dataset], len(train_loader.dataset)) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\core\model.py", line 21, in __init__ self.init_optim() File "E:\python代码\noisy-K-FAC\noisy-K-FAC\core\model.py", line 70, in init_optim momentum=self.config.momentum) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\optimizer.py", line 66, in __init__ inv_devices=inv_devices) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\estimator.py", line 58, in __init__ setup = self._setup(cov_ema_decay) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\estimator.py", line 108, in _setup inv_updates = {op.name: op for op in self._get_all_inverse_update_ops()} File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\estimator.py", line 108, in <dictcomp> inv_updates = {op.name: op for op in self._get_all_inverse_update_ops()} File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\estimator.py", line 116, in _get_all_inverse_update_ops for op in factor.make_inverse_update_ops(): File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\fisher_factors.py", line 360, in make_inverse_update_ops ops.append(inv.assign(utils.posdef_inv(self._cov, damping))) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\utils.py", line 144, in posdef_inv return posdef_inv_functions[POSDEF_INV_METHOD](tensor, identity, damping) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\utils.py", line 161, in posdef_inv_eig tensor + damping * identity) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\ops\linalg_ops.py", line 328, in self_adjoint_eig e, v = gen_linalg_ops.self_adjoint_eig_v2(tensor, compute_v=True, name=name) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\ops\gen_linalg_ops.py", line 2016, in self_adjoint_eig_v2 "SelfAdjointEigV2", input=input, compute_v=compute_v, name=name) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper op_def=op_def) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func return func(*args, **kwargs) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3300, in create_op op_def=op_def) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1801, in __init__ self._traceback = tf_stack.extract_stack() InvalidArgumentError (see above for traceback): Got info = 85505 for batch index 0, expected info = 0. Debug_info = heevd [[node KFAC/SelfAdjointEigV2_10 (defined at E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\utils.py:161) ]]  
tensorflow代码用CPU运行时没有错误，用GPU运行时每次到51%报错，网上没有搜到相同的问题
51%|████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 199/391 [00:38<00:21, 8.81it/s]2019-08-12 20:20:04.963304: I tensorflow/core/kernels/cuda_solvers.cc:159] Creating CudaSolver handles for stream 0000016EAC1D0A40 2019-08-12 20:20:05.763636: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 85505 for batch index 0, expected info = 0. Debug_info = heevd ** On entry to SGEMM parameter number 10 had an illegal value 2019-08-12 20:20:06.320473: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 5236925 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:06.328931: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 1871 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:06.838588: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 687520 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:06.850771: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 321 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:06.999345: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 42770 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:07.499292: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 1497278 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:07.510245: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 321 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:08.020011: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 256112 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:08.529828: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 341471 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:08.540870: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 16833 for batch index 0, expected info = 0. Debug_info = heevd 2019-08-12 20:20:08.697339: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at cuda_solvers.cc:260 : Invalid argument: Got info = 1190 for batch index 0, expected info = 0. Debug_info = heevd Traceback (most recent call last): File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1334, in _do_call return fn(*args) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1319, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1407, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: Got info = 85505 for batch index 0, expected info = 0. Debug_info = heevd [[{{node KFAC/SelfAdjointEigV2_10}}]] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "main.py", line 67, in <module> main() File "main.py", line 63, in main trainer.train() File "E:\python代码\noisy-K-FAC\noisy-K-FAC\core\train.py", line 16, in train self.train_epoch() File "E:\python代码\noisy-K-FAC\noisy-K-FAC\core\train.py", line 42, in train_epoch self.sess.run([self.model.inv_update_op, self.model.var_update_op], feed_dict=feed_dict) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 929, in run run_metadata_ptr) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1152, in _run feed_dict_tensor, options, run_metadata) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1328, in _do_run run_metadata) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1348, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: Got info = 85505 for batch index 0, expected info = 0. Debug_info = heevd [[node KFAC/SelfAdjointEigV2_10 (defined at E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\utils.py:161) ]] Caused by op 'KFAC/SelfAdjointEigV2_10', defined at: File "main.py", line 67, in <module> main() File "main.py", line 60, in main model_ = Model(config, _INPUT_DIM[config.dataset], len(train_loader.dataset)) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\core\model.py", line 21, in __init__ self.init_optim() File "E:\python代码\noisy-K-FAC\noisy-K-FAC\core\model.py", line 70, in init_optim momentum=self.config.momentum) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\optimizer.py", line 66, in __init__ inv_devices=inv_devices) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\estimator.py", line 58, in __init__ setup = self._setup(cov_ema_decay) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\estimator.py", line 108, in _setup inv_updates = {op.name: op for op in self._get_all_inverse_update_ops()} File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\estimator.py", line 108, in <dictcomp> inv_updates = {op.name: op for op in self._get_all_inverse_update_ops()} File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\estimator.py", line 116, in _get_all_inverse_update_ops for op in factor.make_inverse_update_ops(): File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\fisher_factors.py", line 360, in make_inverse_update_ops ops.append(inv.assign(utils.posdef_inv(self._cov, damping))) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\utils.py", line 144, in posdef_inv return posdef_inv_functions[POSDEF_INV_METHOD](tensor, identity, damping) File "E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\utils.py", line 161, in posdef_inv_eig tensor + damping * identity) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\ops\linalg_ops.py", line 328, in self_adjoint_eig e, v = gen_linalg_ops.self_adjoint_eig_v2(tensor, compute_v=True, name=name) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\ops\gen_linalg_ops.py", line 2016, in self_adjoint_eig_v2 "SelfAdjointEigV2", input=input, compute_v=compute_v, name=name) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper op_def=op_def) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func return func(*args, **kwargs) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3300, in create_op op_def=op_def) File "D:\softAPP\python\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1801, in __init__ self._traceback = tf_stack.extract_stack() InvalidArgumentError (see above for traceback): Got info = 85505 for batch index 0, expected info = 0. Debug_info = heevd [[node KFAC/SelfAdjointEigV2_10 (defined at E:\python代码\noisy-K-FAC\noisy-K-FAC\ops\utils.py:161) ]]  

robotium 删除一个listView里的指定Item
public void testDeleteAdBabyChildren() throws Exception { solo.waitForActivity("com.ebay.kijiji.activity.PageMainActivity"); Thread.sleep(3000); solo.clickOnText("Gumtree"); solo.clickOnText("My Ads"); int size = solo.getView(ListView.class, 0).getCount(); if (solo.searchText("Fisher-Price Newborn-to-Toddler Portable Rocker")) { deleteAd("Fisher-Price Newborn-to-Toddler Portable Rocker"); } elseif(solo.searchText("Canon EF 50mm f/1.4 USM lens with original box")) { deleteAd("Canon EF 50mm f/1.4 USM lens with original box"); } elseif(solo.searchText("PS4 used for 2 months")) { deleteAd("PS4 used for 2 months"); } } 每次运行的时候只执行了一个if，但是其他item也存在，就是说其他if条件也成立，但是程序没有运行进去，case就结束了，本来有三个Item要删除，但只删除了一个，其他的还存在，而且case通过了，请问各位大神，如何解决
Java学习的正确打开方式

linux系列之常用运维命令整理笔录

Python十大装B语法
Python 是一种代表简单思想的语言，其语法相对简单，很容易上手。不过，如果就此小视 Python 语法的精妙和深邃，那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点，并附上详细的实例代码。如能在实战中融会贯通、灵活使用，必将使代码更为精炼、高效，同时也会极大提升代码B格，使之看上去更老练，读起来更优雅。

2019年11月中国大陆编程语言排行榜
2019年11月2日，我统计了某招聘网站，获得有效程序员招聘数据9万条。针对招聘信息，提取编程语言关键字，并统计如下： 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...

《奇巧淫技》系列-python！！每天早上八点自动发送天气预报邮件到QQ邮箱

SQL-小白最佳入门sql查询一

redis分布式锁，面试官请随便问，我都会

Nginx 原理和架构
Nginx 是一个免费的，开源的，高性能的 HTTP 服务器和反向代理，以及 IMAP / POP3 代理服务器。Nginx 以其高性能，稳定性，丰富的功能，简单的配置和低资源消耗而闻名。 Nginx 的整体架构 Nginx 里有一个 master 进程和多个 worker 进程。master 进程并不处理网络请求，主要负责调度工作进程：加载配置、启动工作进程及非停升级。worker 进程负责处...
Python 编程开发 实用经验和技巧
Python是一门很灵活的语言，也有很多实用的方法，有时候实现一个功能可以用多种方法实现，我这里总结了一些常用的方法和技巧，包括小数保留指定位小数、判断变量的数据类型、类方法@classmethod、制表符中文对齐、遍历字典、datetime.timedelta的使用等，会持续更新......
Idon’t know what that dream is that you have, I don't care how disappointing it might have been as you've been working toward that dream,but that dream that you’re holding in your mind, that it’s po...
“狗屁不通文章生成器”登顶GitHub热榜，分分钟写出万字形式主义大作

《程序人生》系列-这个程序员只用了20行代码就拿了冠军

11月8日，由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办，科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。 　　区块链技术被认为是继蒸汽机、电力、互联网之后，下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力，电力解决了人类基本的生活需求，互联网彻底改变了信息传递的方式，区块链作为构造信任的技术有重要的价值。 　　1...
Java世界最常用的工具类库
Apache Commons Apache Commons有很多子项目 Google Guava 参考博客

8年经验面试官详解 Java 面试秘诀

1.两种思维方式在求职面试中，经常会考察这种问题：北京有多少量特斯拉汽车？某胡同口的煎饼摊一年能卖出多少个煎饼？深圳有多少个产品经理？一辆公交车里能装下多少个乒乓球？一个正常成年人有多少根头发？这类估算问题，被称为费米问题，是以科学家费米命名的。为什么面试会问这种问题呢？这类问题能把两类人清楚地区分出来。一类是具有文科思维的人，擅长赞叹和模糊想象，它主要依靠的是人的第一反应和直觉，比如小孩...

17张图带你解析红黑树的原理！保证你能看懂！

so easy！ 10行代码写个"狗屁不通"文章生成器

MySQL数据库总结

20行Python代码爬取王者荣耀全英雄皮肤