Python数据可视化—seaborn简介和实例

这里实例采用的数据集都是seaborn提供的几个经典数据集,dataset文件可见于Github。 1  set_style( ) 设置主题 Seaborn有五个预设好的主题: darkgrid , whitegrid , dark , white ,和 ticks  默认: darkgrid i...

2016-12-23 21:43:54

阅读数 58997

评论数 2

Python数据可视化—matplotlib笔记

在参加数据挖掘竞赛中,经常需要对数据进行可视化。今天有空就对数据可视化— matplotlib这块内容系统的整理下,方便查找使用。本文来自于对《利用python进行数据分析》以及网上一些博客的总结。 1  matplotlib简介 matplotlib是Pythom可视化程序库的泰斗,经过几十...

2016-12-22 18:49:40

阅读数 4239

评论数 0

xgboost特征选择

Xgboost在各大数据挖掘比赛中是一个大杀器,往往可以取得比其他各种机器学习算法更好的效果。数据预处理,特征工程,调参对Xgboost的效果有着非常重要的影响。这里介绍一下运用xgboost的特征选择,运用xgboost的特征选择可以筛选出更加有效的特征代入Xgboost模型。 这里采...

2016-11-27 11:22:05

阅读数 30001

评论数 9

[Python] Python基础笔记

1.Python是一种解释型语言.Python解释器是通过“一次执行一条语句”的方式运行程序的。Python科学计算程序员则更趋向于使用IPython(一种加强的交互式Python解释器)。通过使用命令%run,IPython会在同一个进程中执行指定文件中的代码。(.py文件和IPython解释器...

2016-11-14 13:46:11

阅读数 610

评论数 0

[面试算法] 基本算法

不用加减号求两数的和int getSum(int a, int b) { if (b == 0) return a; return getSum(a^b, (a &b) << 1); }二叉树插入T...

2018-02-22 18:34:02

阅读数 179

评论数 0

[Leetcode] #268 Missing Number

DiscriptionGiven an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example,Given num...

2017-09-16 14:44:56

阅读数 248

评论数 0

[Leetcode] #41 First Missing Positive

DiscriptionGiven an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your a...

2017-09-16 14:25:41

阅读数 345

评论数 0

[Leetcode] #4 Median of Two Sorted Arrays

Discription There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall r...

2017-09-16 11:26:11

阅读数 332

评论数 0

[Leetcode] #99 Recover Binary Search Tree

DiscriptionTwo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Solutionclass Solution {...

2017-09-15 22:09:41

阅读数 171

评论数 0

[Leetcode] #56 Merge Intervals

DiscriptionGiven a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18]....

2017-09-15 21:41:00

阅读数 139

评论数 0

[Leetcode] #121#122#123#188 Best Time to Buy and Sell Stock I & II & III & IV

给出每天的价格,求最大利润。I 一次买进卖出int maxProfit(vector<int>& prices) { int profit = 0, max_profit = 0; for (int i = 1; i &...

2017-09-15 19:53:19

阅读数 234

评论数 0

[Leetcode] #164 Maximum Gap

Discription Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linea...

2017-09-10 13:54:48

阅读数 184

评论数 0

[Leetcode] #239 Sliding Window Maximum

Discription:Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only ...

2017-09-04 20:43:11

阅读数 192

评论数 0

[Leetcode] #50 Pow(x, n)

Discription:Implement pow(x, n).Solution:double myPow(double x, int n) { if (n == 0) return 1.0; if (n < 0){ if (n == INT_MIN) retu...

2017-08-20 10:37:03

阅读数 175

评论数 0

[Leetcode] #343 Integer Break (DP)

DiscriptionGiven a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the...

2017-05-09 09:35:19

阅读数 284

评论数 0

[Leetcode] #392 Is Subsequence

Discription:Given a string s and a string t, check if s is subsequence of t.You may assume that there is only lower case English letters in both s an...

2017-05-08 18:45:25

阅读数 328

评论数 0

[Leetcode] #334 Increasing Triplet Subsequence

Discription: Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function s...

2017-05-08 10:38:56

阅读数 265

评论数 0

[Leetcode] #329 Longest Increasing Path in a Matrix (DFS)

Discription: Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions:...

2017-05-08 09:58:57

阅读数 207

评论数 0

[Leetcode] #322 Coin Change (DP)

Discription:You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins...

2017-05-07 21:52:31

阅读数 244

评论数 0

[Leetcode] #207#210 Course Schedule I & II (BFS)

DiscriptionThere are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0...

2017-05-07 21:08:58

阅读数 360

评论数 0

提示
确定要删除当前文章?
取消 删除
关闭
关闭