摘要: 1. Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your ma 阅读全文
posted @ 2019-11-21 22:42 强威 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1.Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where th 阅读全文
posted @ 2019-11-15 09:39 强威 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2019-11-05 21:23 强威 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). Y 阅读全文
posted @ 2019-11-05 20:38 强威 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime com 阅读全文
posted @ 2019-11-05 20:34 强威 阅读(117) 评论(0) 推荐(0) 编辑
摘要: (待完成。。。) SVM推导: 核函数: SMO: 阅读全文
posted @ 2019-05-06 11:32 强威 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 利用logistic回归进行分类的主要思想:根据现有数据对分类边界建立回归公式,并以此进行分类。 logistic优缺点: 优点:计算代价不高,易于理解和实现。缺点:容易欠拟合,分类精度可能不高。 .适用数据类型:数值型和标称型数据。 sigmoid函数: 梯度上升法: 梯度: 该公式将一直被迭代执 阅读全文
posted @ 2019-04-25 18:49 强威 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 首先了解一下三个比较重要的公式: 条件概率公式:P(A|B)=P(AB)/P(B) 全概率公式: 贝叶斯:P(B|A) = P(A|B)P(B)/P(A) 优 点 :在数据较少的情况下仍然有效,可以处理多类别问题。缺 点 :对于输入数据的准备方式较为敏感。适用数据类型:标称型数据。 朴素贝叶斯中朴素 阅读全文
posted @ 2019-04-23 14:34 强威 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 决策树优特点:优点:计算复杂度不高,输出结果易于理解,对中间值的缺失不敏感,可以处理不相关特征数据。缺点:可能会产生过度匹配问题。适用数据类型:数值型和标称型 使用ID3算法划分数据集并构建决策树: 利用matplotlib注解绘制树形图: 数据集下载以及完整jupyter notebook 代码下 阅读全文
posted @ 2019-04-16 20:46 强威 阅读(231) 评论(0) 推荐(0) 编辑
摘要: KNN也称K-近邻算法,简单来说,KNN采用测量不同特征值之间的距离的方法进行分类。 优点:精度高,对异常值不敏感,无数据输入假定。 确定:时间复杂度、空间复杂度较高 适用数据范围:数值型和标称型 工作原理简介:存在一个样本数据集合,并且每个样本数据集中都存在标签。输入没有标签的数据集之后,将新数据 阅读全文
posted @ 2019-04-15 16:30 强威 阅读(246) 评论(0) 推荐(0) 编辑