- 博客(10)
- 收藏
- 关注
原创 剑指offer(面试题50)树中两结点的最低公共祖先(C++实现)
#include #include using namespace std; struct TreeNode { int val; TreeNode * left; TreeNode * right; }; bool FindPath(TreeNode * root, TreeNode * pNode, vector & vec) { if (root =
2018-01-01 16:32:03
470
原创 两个队列实现一个栈
两个队列实现一个栈: class Stack { private : queue q[2]; int current = 0; public : void Push(int data) { q[current].push(data); } int Pop() { int result = 0;
2017-12-14 22:00:58
246
原创 sklearn.decomposition.PCA介绍
sklearn.decomposition.PCA介绍 下面我们主要基于sklearn.decomposition.PCA来讲解如何使用scikit-learn进行PCA降维。PCA类基本不需要调参,一般来说,我们只需要指定我们需要降维到的维度,或者我们希望降维后的主成分的方差和占原始维度所有特征方差和的比例阈值就可以了。 现在我们对sklearn.decomposit
2017-09-22 16:50:22
17603
1
原创 两个简单的 sklearn 实例
第一个实例 LR分辨肿瘤的良性或者恶性 import pandas as pd import numpy as np from time import time column_names = ['Sample code number', 'Clump Thickness', 'Uniformity of Cell Size', 'Uniformity of Cell Shape',
2017-09-06 15:08:30
1312
原创 hive 启动时报错: Exception in thread "main" java.lang.RuntimeException: java.lang.
might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'. Exception in thr
2017-08-24 09:59:21
10199
1
原创 AttributeError: 'list' object has no attribute 'write_pdf'
from sklearn import datasetsx,y = datasets.make_classification(1000,20,n_informative = 3)from sklearn.tree import DecisionTreeClassifierdt = DecisionTreeClassifier()dt.fit(x,y) from StringIO import
2017-08-23 17:25:25
3898
原创 hadoop中 INFO ipc.Client: Retrying connect to server错误解决办法
运行hadoop jar hadoop-mapreduce-examples-2.6.4.jar wordcount /wordcount/input/ /wordcount/output时,一直尝试连接Retrying connect to server: mini4/192.168.132.8:8032. 错误提示如下: 17/08/22 18:48:41 INFO client.R
2017-08-22 10:57:10
27849
5
原创 Mac 操作积累笔记
sx10.11.1 上面sudo pip install ipython时出现的问题。f executing pip with sudo, you may want sudo's -H flag.
2017-08-21 22:28:57
373
原创 寻找第k大的数
// // main.cpp //findk // // Created by Xiao Bang on 2017/6/28. // Copyright © 2017年 Xiao Bang. All rights reserved. // #include #include using namespace std; template const Comparable & media
2017-07-02 10:58:51
448
原创 动态规划 背包问题 C++
// main.cpp // DP程序 //这是一个动态规划来解决背包问题的程序 //本程序的实例和理论来源博客的链接为 http://blog.youkuaiyun.com/mu399/article/details/7722810 //http://blog.youkuaiyun.com/dapengbusi/article/details/7463968 // 初次编写 by肖邦 // Created by ...
2017-04-03 16:27:41
929
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅