摘要: 逻辑回归(Logistic Regression) 原文链接:https://zhuanlan.zhihu.com/p/28408516 逻辑回归的定义 简单来说, 逻辑回归(Logistic Regression)是一种用于解决二分类(0 or 1)问题的机器学习方法,用于估计某种事物的可能性。比 阅读全文
posted @ 2020-09-02 09:36 Neil_J 阅读(3370) 评论(0) 推荐(0) 编辑
摘要: 逻辑回归 logistics regression 公式推导 原文链接,转载请注明出处。 https://zhuanlan.zhihu.com/p/44591359 (常规字母代表标量,粗体字母代表向量,大写粗体字母代表矩阵) 逻辑回归虽然名字里面有回归,但是主要用来解决分类问题。 一、线性回归(L 阅读全文
posted @ 2020-09-02 09:33 Neil_J 阅读(434) 评论(0) 推荐(0) 编辑
摘要: class Solution { public boolean isFlipedString(String s1, String s2) { if(s1.length() != s2.length()){ // 判断两个字符串长度,不等直接返回false return false; } return 阅读全文
posted @ 2020-08-27 11:13 Neil_J 阅读(109) 评论(0) 推荐(0) 编辑
摘要: class Solution { public boolean canPermutePalindrome(String s) { Map<Character, Integer> chars = new HashMap<>(); for (char c : s.toCharArray()){ if ( 阅读全文
posted @ 2020-08-26 16:52 Neil_J 阅读(83) 评论(0) 推荐(0) 编辑
摘要: class Solution { public String replaceSpaces(String S, int length) { StringBuilder sb = new StringBuilder(); for (int i=0; i<length; i++){ // 以真实长度为界 阅读全文
posted @ 2020-08-25 20:07 Neil_J 阅读(78) 评论(0) 推荐(0) 编辑
摘要: class Solution { public boolean CheckPermutation(String s1, String s2) { if(s1.length()!=s2.length()){ return false; } int[] array = new int[128]; # 存 阅读全文
posted @ 2020-08-25 10:59 Neil_J 阅读(114) 评论(0) 推荐(0) 编辑
摘要: class Solution { public boolean isUnique(String astr) { boolean flag = true; int count = astr.length(); if (count != 0 || count != 1){ for (int i = 0; 阅读全文
posted @ 2020-08-25 08:55 Neil_J 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 操作字符串的类有: String、 StringBuffer、 StringBuilder String 和 StringBuffer、StringBuilder的区别在于: String声明的是不可变的对象,每次操作都会new一个新的 String对象,然后将指针指向新的 String对象 而 S 阅读全文
posted @ 2020-08-23 21:56 Neil_J 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 原文链接:https://www.cnblogs.com/Qian123/p/5703507.html#_label1 hashcode() 方法详解 hashCode()方法给对象返回一个hash code值。这个方法被用于hash tables,例如HashMap。 它的性质是: 在一个Java 阅读全文
posted @ 2020-08-22 21:36 Neil_J 阅读(1155) 评论(0) 推荐(0) 编辑
摘要: == 解读 对于基本类型和引用类型 == 的作用效果是不同的。 基本类型:比较值是否相同; 引用类型:比较引用是否相同。 代码示例: 1 String x = "string"; 2 String y = "string"; 3 String z = new String("string"); 4 阅读全文
posted @ 2020-08-22 21:24 Neil_J 阅读(148) 评论(0) 推荐(0) 编辑