- 博客(50)
- 资源 (2)
- 收藏
- 关注
原创 vue框架中更改body,html页面背景颜色
beforeCreate () { document.querySelector('body').setAttribute('style', 'background-color:#fff')},beforeDestroy () { document.querySelector('body').removeAttribute('style')}
2018-09-06 10:54:20
16442
4
原创 npm 报错 chromedriver@2.41.0 install: `node install.js`
解决方法:在你创建的项目目录下,比如创建的项目叫my-project,然后进入my-project这个目录,在该目录中执行npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver这样问题就解决了。...
2018-08-24 11:50:56
11105
4
原创 前端vonic框架搭建
1.克隆开发脚手架:项目使用Vonic作为UI模板,开发者提供了一个Vonic的开发脚手架,即如下网址:https://github.com/wangdahoo/vonic-webpack-starter操作命令:git clone https://github.com/wangdahoo/vonic-webpack-starter2.进入vonic-webpack-starter文件...
2018-08-10 10:40:33
9373
原创 详解贝叶斯分类器
1.贝叶斯决策论 贝叶斯分类器是一类分类算法的总称,贝叶斯定理是这类算法的核心,因此统称为贝叶斯分类。贝叶斯决策论通过相关概率已知的情况下利用误判损失来选择最优的类别分类。 “风险”(误判损失)= 原本为cj的样本误分类成ci产生的期望损失,期望损失可通过下式计算:为了最小化总体风险,只需在每个样本上选择能够使条件风险R(c|x)最小的类别标记。最小化分类错误率的贝叶斯最优分类器...
2018-04-18 11:46:40
55863
11
原创 决策树剪枝策略实例分析
预剪枝:是在决策树的生成过程中,对每个结点在划分前先进行估计,若当前结点的划分不能带来决策树泛化性能提升,则停止划分即结束树的构建并将当前节点标记为叶结点;后剪枝:是先从训练集生成一棵完整的决策树,然后自底向上地对叶结点进行考察,若将该结点对应的子树替换为叶结点能带来决策树泛化为性能提升,则将该子树替换为叶结点。泛化性能的提升可以使用交叉验证数据来检查修剪的效果,通过使用交叉验证数据,测试扩展节点...
2018-04-11 16:06:29
7865
2
原创 这样理解决策树
决策树1.基本流程 决策树(Decisiontree)是一类常见的机器学习方法。决策树学习的目的是,从给定训练数据集学得一个模型用于对未见数据进行分类,我们希望这棵树泛化能力强,也就是说对未见示例的处理能力强。下面看一个简单的范例: 在对“这是好瓜吗?”这一问题进行决策的过程中,我们通常会进行一系列的子决策,如瓜的颜色、根蒂、
2018-04-11 16:00:06
633
原创 Windows 系统利用anaconda/Pycharm解决 python2 与 python3 共存问题
一、anaconda方法1、之前使用首先安装Anaconda3,按照正常步骤安装即可,安装目录为C:\ProgramData\Anaconda3。2、安装到此步,这两项打钩,这样不需要配置环境变量。3、安装好Anaconda3之后,再安装Anaconda2,这里Anaconda2的安装目录必须选在D:\Anaconda3\envs子目录下,将anaconda2安装在该子目录下的
2017-08-31 15:41:16
3081
原创 小波滤波及小波基函数的选择
与傅里叶变换相比,小波变换的缺点是小波基函数不具有唯一性,因此小波分析应用到实际中的一个难点就是最佳小波基函数的选取。 傅里叶分析法就是将信号分解成一系列不同的频率的正弦(余弦)函数的叠加,是一种全局变换,实现信号时域到频域的转化,即对信号的描述或在时域或在频域,无法进一步了解频域的信息具体对应与时域的哪一段。而小波变换可以在时域和频域上来表征信号的局部特征,有利于对信号的分析
2017-08-22 15:53:54
32110
原创 LeetCode 101 Symmertic Tree(Python详解及实现)
【题目】Given a binary tree, check whether it is amirror of itself (ie, symmetric around its center). For example, this binary tree[1,2,2,3,4,4,3] is symmetric: 1 /\ 2 2 / \/ \3
2017-08-11 18:15:11
686
原创 LeetCode 100 Same Tree(Python详解及实现)
【题目】Given two binary trees, write a function tocheck if they are equal or not. Two binary trees are considered equal ifthey are structurally identical and the nodes have the same value. 给定两棵
2017-08-11 16:52:26
739
原创 LeetCode 99 Recover Binary Search Tree(Python详解及实现)
【题目】Two elements of a binary search tree (BST)are swapped by mistake. Recover the tree without changing itsstructure. Note:A solution using O(n) space is prettystraight forward. Could you
2017-08-11 16:43:58
552
原创 LeetCode 98 Validate Binary Search Tree(Python详解及实现)
【题目】Given a binary tree, determine if it is avalid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains onlynodes with keys less than the node's
2017-08-11 12:25:20
1174
原创 LeetCode 97 Interleaving String(Python详解及实现)
【题目】Given s1, s2, s3, find whether s3 is formedby the interleaving of s1 and s2. For example,Given:s1 = "aabcc",s2 = "dbbca", When s3 = "aadbbcbcac", returntrue.When s3 = "aadbbbaccc
2017-08-11 10:16:37
1821
原创 LeetCode 96 Unique Binary Search Tree(Python详解及实现)
【题目】Given an integer n, generate allstructurally unique BST's (binary search trees) that store values 1...n. For example,Given n = 3, your program should return all5 unique BST's shown below.
2017-08-10 18:37:29
1046
原创 LeetCode 95 Unique Binary Search Tree II(Python详解及实现)
【题目】Given an integer n, generate allstructurally unique BST's (binary search trees) that store values 1...n. For example,Given n = 3, your program should return all5 unique BST's shown below.
2017-08-10 18:25:48
1642
原创 LeetCode 94 Binary Tree Inorder Traversal(Python详解及实现)
【题目】Given a binary tree, return the inordertraversal of its nodes' values. For example:Given binary tree [1,null,2,3], 1 \ 2 / 3return [1,3,2].Note: Recursive soluti
2017-08-10 16:10:57
4227
原创 LeetCode 93 Restore IP Addresses(Python详解及实现)
【题目】Given a string containing only digits,restore it by returning all possible valid IP address combinations. For example:Given "25525511135", return ["255.255.11.135","255.255.111.35"]. (
2017-08-10 13:57:28
1911
1
原创 LeetCode 92 Reverse Linked List II (Python详解及实现)
【题目】Reverse a linked list from position m to n.Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m= 2 and n = 4, return 1->4->3->2->5->NULL. Note:Given m, n sati
2017-08-10 11:09:23
1740
原创 LeetCode 91 Decode Ways (Python详解及实现)
【题目】Amessage containing letters from A-Z is being encoded to numbers using thefollowing mapping: 'A'-> 1'B'-> 2...'Z'-> 26Given anencoded message containing digits, determine the total n
2017-08-10 10:18:48
2470
原创 LeetCode 90 SubsetsII (Python详解及实现)
【题目】Given a collection of integers that mightcontain duplicates, nums, return all possible subsets. Note: The solution set must not containduplicate subsets. For example,If nums = [1,2,2],
2017-08-09 19:34:19
1009
原创 LeetCode 89 Gray Code (Python详解及实现)
【题目】The gray code is a binary numeral systemwhere two successive values differ in only one bit. Given a non-negative integer n representingthe total number of bits in the code, print the sequenc
2017-08-09 19:23:05
1061
原创 LeetCode 87 Scramble String (Python详解及实现)
【题目】Given a string s1, we may represent it as abinary tree by partitioning it to two non-empty substrings recursively. Below is one possible representation of s1= "great": great / \
2017-08-09 18:30:23
605
原创 LeetCode 86 Partition List (Python详解及实现)
【题目】Given a linked list and a value x,partition it such that all nodes less than x come before nodes greater than orequal to x. You should preserve the original relativeorder of the nodes in eac
2017-08-09 17:15:43
690
原创 LeetCode 85 Maximal Rectangle (Python详解及实现)
【题目】Given a 2D binary matrix filled with 0'sand 1's, find the largest rectangle containing only 1's and return its area. For example, given the following matrix: 1 0 1 0 01 0 1 1 11 1 1
2017-08-09 16:37:19
1911
原创 LeetCode 84 Largest Rectangle in Histogram (Python详解及实现)
【题目】Given n non-negative integers representingthe histogram's bar height where the width of each bar is 1, find the area oflargest rectangle in the histogram.Above is a histogram where width of
2017-08-09 15:34:40
2228
原创 25_LeetCode 82&83. Remove Duplicates from Sorted List(II) (Python详解及实现)
【题目】83Given a sorted linked list, delete allduplicates such that each element appear only once. For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return1->2->3. 给定一个有序链表,删除重复元素
2017-08-09 11:18:53
328
原创 LeetCode 81 Search in Rotated Sorted Array II (Python详解及实现)
【题目】Follow up for "Search in RotatedSorted Array":What if duplicates are allowed? Would this affect the run-time complexity?How and why?Suppose an array sorted in ascending orderis rotated a
2017-08-08 17:39:40
319
原创 LeetCode 80 Remove Duplicates from Sorted Array II (Python详解及实现)
【题目】Follow up for "RemoveDuplicates":What if duplicates are allowed at mosttwice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function should return length = 5,with the fir
2017-08-08 16:24:42
731
原创 LeetCode 79 Word Search (Python详解及实现)
【题目】Given a 2D board and a word, find if theword exists in the grid. The word can be constructed from letters ofsequentially adjacent cell, where "adjacent" cells are thosehorizontally or vertic
2017-08-08 15:30:56
2719
原创 LeetCode 78 Subsets (Python详解及实现)
【题目】Given a set of distinct integers, nums,return all possible subsets. Note: The solution set must not containduplicate subsets. For example,If nums = [1,2,3], a solution is: [ [3],
2017-08-08 14:22:29
2444
原创 LeetCode 77 Combinations (Python详解及实现)
【题目】Given two integers n and k, return allpossible combinations of k numbers out of 1 ... n. For example,If n = 4 and k = 2, a solution is: [ [2,4], [3,4], [2,3], [1,2], [1,3],
2017-08-08 13:50:46
3089
原创 LeetCode 76 Minimum Window Substring(Python详解及实现)
【题目】Given a string S and a string T, find theminimum window in S which will contain all the characters in T in complexityO(n). For example,S = "ADOBECODEBANC"T = "ABC"Minimum window is "BA
2017-08-08 11:27:56
1911
原创 LeetCode 75 SortColor(Python详解及实现)
【题目】Given an array with n objects colored red,white or blue, sort them so that objects of the same color are adjacent, withthe colors in the order red, white and blue. Here, we will use the inte
2017-08-08 09:57:53
664
原创 LeetCode 74 Search a 2D Matrix(Python详解及实现)
【题目】Write an efficient algorithm that searchesfor a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from leftto right.The first integer of e
2017-08-08 09:24:10
385
原创 LeetCode 73 Set Matrix Zeroes(Python详解及实现)
【题目】Given a m x n matrix, if an element is 0,set its entire row and column to 0. Do it in place.Follow up:Did you use extra space?A straight forward solution using O(mn)space is probably a bad
2017-08-05 18:09:35
1456
原创 LeetCode 72 Edit Distance(Python详解及实现)
【题目】Given two words word1 and word2, find theminimum number of steps required to convert word1 to word2. (each operation iscounted as 1 step.) You have the following 3 operationspermitted on a w
2017-08-05 16:17:05
4165
原创 LeetCode 71 Simplify Path(Python详解及实现)
【题目】Given an absolute path for a file(Unix-style), simplify it. For example,path = "/home/", =>"/home"path = "/a/./b/../../c/", =>"/c" 简化Unix上的绝对路径,也就是多个'/'代表一个,'..'表示返回上一级目录,‘.'代表当前目录。
2017-08-05 14:44:50
891
原创 LeetCode 70 Climbing Stairs(Python详解及实现)
【题目】You are climbing a stair case. It takes nsteps to reach to the top. Each time you can either climb 1 or 2steps. In how many distinct ways can you climb to the top? Note: Given n will be
2017-08-05 12:56:00
1850
原创 LeetCode 68 Text Justification(Python详解及实现)
【题目】Given an array of words and a length L,format the text such that each line has exactly L characters and is fully (leftand right) justified. You should pack your words in a greedyapproach; th
2017-08-05 12:29:47
1228
原创 LeetCode 66 Plus One (Python详解及实现)
【题目】Given a non-negative integer represented asa non-empty array of digits, plus one to the integer. You may assume the integer do not containany leading zero, except the number 0 itself. Th
2017-08-03 19:23:19
687
yolov7预训练权重
2022-07-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人