Statistical learning method - perceptron + handwritten code

preface I've been reading Dr. Li Hang's "statistical learning methods" recently. I'll make a small record here and write down my understanding. I welcome your criticism and correction. text Intuitive understanding of perceptron Perceptron should be the simplest algorithm among machine learning algorithms. Its principle can be seen i ...

Added by Daggeth on Thu, 16 Dec 2021 19:32:08 +0200

Java handwriting algorithm interview questions

java written test handwriting algorithm interview questions with answers 1. Count the number of words in an English article. public class WordCounting { public static void main(String[] args) { try(FileReader fr = new FileReader("a.txt")) { int counter = 0; boolean state = false; int currentChar; while((currentChar= fr.read()) != -1) { if(cur ...

Added by mabwi on Thu, 16 Dec 2021 18:52:13 +0200

[mathematical modeling Python] linear programming of programming problems

Examples Take the following linear programming as an example 2 x 1 + 3 x 2 − ...

Added by Sirus121 on Thu, 16 Dec 2021 18:30:17 +0200

PyTorch deep learning practice notes - 03 gradient descent algorithm

Learning video source: link. Course summary Question: how to find the optimal value of weight As shown in the following figure, assuming that the initial value of W is the position of the red dot, how can we update w to approach the minimum value of the loss function The update algorithm is: Algorithm explanation: when the partial derivativ ...

Added by Cheeky Chino on Thu, 16 Dec 2021 12:08:34 +0200

JAVA sorting algorithms

Sorting algorithm Enter an integer array and output the sorted array. Here, take "no descending sorting" as an example. I sorted out the information for follow-up search. Beginners may have mistakes. I hope you don't mind and can point it out. Bubble sorting Principle: search from the array header in turn, and exchange position ...

Added by hcdarkmage on Thu, 16 Dec 2021 11:43:35 +0200

hashtable is a data structure that can be accessed directly according to the key value

What is hash Hash is used to map a large range of numbers (such as [10 ^ - 9, 109]) to a smaller interval. For example, for 109, we want it to be mapped to the interval [0, 105] (which can also be understood as an array). We can directly remainder 109 (10 ^ 9% 10 ^ 5), and then determine the falling point of the number in the interval accordin ...

Added by Nulletz on Thu, 16 Dec 2021 10:56:35 +0200

Implementing k-means algorithm from 0

k-means algorithm Partition based method Given a data set D with N data objects and the number of clusters to be generated K (k < n), in the partition method D, the objects are allocated to K groups, and each group represents a cluster. Then an objective function is used to evaluate the partition quality, so that the objects in the cluster ...

Added by cjacks on Thu, 16 Dec 2021 10:50:23 +0200

[final examination of data structure experiment] - delete the first largest element and its duplicate node in the single linked list

[final examination of data structure experiment] - delete the first largest element and its duplicate node in the single linked list subject Known single linked list A, write an algorithm to delete the first largest element in the single linked list.Given the single linked list L, write an algorithm to delete its duplicate nodes (only one is ...

Added by saidbakr on Thu, 16 Dec 2021 03:18:45 +0200

LeetCode algorithm learning notes - Day4

Java circular linked list Give you a head node of the linked list to judge whether there are links in the linked list.Returns true if there are links in the linked list. Otherwise, false is returned. LeetCode's friends use the fast and slow double pointer writing method to judge... I don't think it's necessary. It's a little inefficient Let's ...

Added by ruzztec on Thu, 16 Dec 2021 01:04:56 +0200

Blue Bridge Cup practice 008

Blue Bridge Cup practice 008 Interview question 01.06 String compression String compression. Using the number of character repetitions, write a method to realize the basic string compression function. For example, the string aabcccccaaa becomes a2b1c5a3. If the "compressed" string is not shorter, the original string is returned. You ...

Added by plautzer on Wed, 15 Dec 2021 21:58:08 +0200