07 2018 档案
摘要:1.从代价函数谈起SVM 图一 根据将y=0||y=1,得到逻辑回归的代价函数,那么SVM和其代价函数是相似的,只不过是引入了cost0与cost1,并且自变量使用了theta_T*x(i),并且由于SVM的通常表示方法,得到了如下的优化函数假设: 在代价函数项加上了系数C(=1/lamda),也就
阅读全文
摘要:1.神经网络模型1 图1 这是一个神经网络的模型,通常设置一个x0,作为偏执单元或者偏置(bias)神经元。 图2 这里最后一句话,说的是系数矩阵θ,神经网络模型中,如果当前在j层有s_j个单元,在j+1层有s_j+1个单元,那么第j层的系数矩阵theta_j,是s_j+1(s_j +1)维的。 /
阅读全文
摘要:链接:https://www.nowcoder.com/questionTerminal/4b20ed271e864f06ab77a984e71c090f来源:牛客网PAT 1018 Public Bike Management There is a public bike service in H
阅读全文
摘要:Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the c
阅读全文
摘要:1.过度拟合overfitting 过度拟合,因为有太多的特征+过少的训练数据,学习到的假设可能很适应训练集,但是不能泛化到新的样例。即泛化generalize能力差。 解决办法: 1.手动/使用选择算法来确定保留的特征。 2.当所有的特征都对结果有一定贡献时,需要正则化,保留所有特征,但是降低θ的
阅读全文
摘要:1.极大似然估计-逻辑回归代价函数的简化 Andrew Ng的ML视频上讲到:逻辑回归的代价函数可以用最大似然估计法进行简化成上图中第二个式子。 所以学习了一下极大似然估计原理: 2.求偏导 逻辑回归代价函数对θj求偏导,得到手写的部分。手动求解偏导函数如下: 卡住了,还是不太会求,怎么求啊!怎么可
阅读全文
摘要:Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the c
阅读全文
摘要:A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, dependi
阅读全文
摘要:A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re
阅读全文
摘要://转自:https://blog.csdn.net/apie_czx/article/details/45537627 1014 Waiting in Line (30)(30 分)Suppose a bank has N windows open for service. There is a
阅读全文
摘要:It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c
阅读全文
摘要:To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mat
阅读全文
摘要:With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing ba
阅读全文
摘要:Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is
阅读全文
摘要:This time, you are supposed to find A*B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu
阅读全文
摘要:转自:https://www.jianshu.com/p/c7e642877b0e 梯度下降法,思想及代码解读。 import numpy as np # Size of the points dataset. m = 20 # Points x-coordinate and dummy value
阅读全文
摘要:Given a sequence of K integers { N~1~, N~2~, ..., N~K~ }. A continuous subsequence is defined to be { N~i~, N~i+1~, ..., N~j~ } where 1 <= i <= j <= K
阅读全文
摘要:At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door
阅读全文
摘要:Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specificat
阅读全文
摘要:A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Each input file contain
阅读全文
摘要:As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some ro
阅读全文
摘要:This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Each case occupies 2 lines, a
阅读全文
摘要:Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less t
阅读全文
摘要:1.前束范式 一个公式,如果量词均在全式的开头,它们的作用域延伸到整个公式的末尾,则称为是前束范式。例如:(x)(y)(z)(Q(x,y)→R(z))的地方是并或交。任何一个谓词公式都有一个前束范式等价。 2.容斥原理 n个集合的并集的元素的个数=每个集合元素的个数和-两两集合交+三三集合交
阅读全文
摘要:1.最短路径算法 //转自:https://www.cnblogs.com/hxsyl/p/3270401.html 迪杰斯特拉算法:不能处理负权的边,因为它的过程就是寻找到源点最短的边,可能会找不到最短的边。如 存在三个点,1和2之间权值为3,1和3之间权值为4,2和3之间权值为-2.这样的话d[
阅读全文
摘要://来自:https://softwareengineering.stackexchange.com/questions/148108/why-is-global-state-so-evil 首先,全局变量让程序的状态变得不可预测。 详细地说,比如有两个对象都用到了同一个全局变量,但是假设我们没有用
阅读全文
摘要:1.特征向量,求解公式。//转自:https://blog.csdn.net/woainishifu/article/details/76418176 从数学上讲,Ax= λx,也就是矩阵A作用于列向量x后,x仍然在原来的直线上,仍然是平行于原来的,所以即可以用 λ和x来完全表述矩阵A。 //PS我
阅读全文
摘要:面试用,转自:https://www.cnblogs.com/fjdingsd/p/5273008.html 1.ACID A:原子性:原子性是指事务包含的所有操作要么全部成功,要么全部失败回滚,因此事务的操作如果成功就必须要完全应用到数据库,如果操作失败则不能对数据库有任何影响。 C:一致性:一致
阅读全文
摘要:链接:https://mp.weixin.qq.com/s/NugGnNX4Vv3SNhQrmzjF-A 有两个鸡蛋,100层楼,如何准确地测试出哪层鸡蛋会碎? 有类似二分法,和解方程法。 设最少次数为x,则可以证明应该x层扔下。若从x+1层扔下,需要扔x+1次;若从x-1层扔下,则需扔x-1次,略
阅读全文
摘要:题目描述 输入一个整数n(2<=n<=10000),要求输出所有从1到这个整数之间(不包括1和这个整数)个位为1的素数,如果没有则输出-1。 输入描述: 输入有多组数据。 每组一行,输入n。 输出描述: 输出所有从1到这个整数之间(不包括1和这个整数)个位为1的素数(素数之间用空格隔开,最后一个素数
阅读全文
摘要:A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number
阅读全文
浙公网安备 33010602011771号