[machine learning] KNN algorithm practice teaching

[machine learning] iris classification based on KNN algorithm 1. General KNN algorithm (k-nearest neighbor) is one of the basic algorithms in the field of machine learning. It is often used for classification problems and regression problems. 2. Calculation process of KNN algorithm 2.1 algorithm core The principle of KNN algorithm can ...

Posted on Sat, 25 Sep 2021 14:59:53 -0400 by sendoh07

java design pattern (sections 13-19)

catalogue Interface isolation principle -- object oriented design principle Definition of interface isolation principle Advantages of interface isolation principle Implementation method of interface isolation principle Dimitri's Law -- object oriented design principle Definition of Demeter's law Advantages of Dimitri's law Implementatio ...

Posted on Sat, 25 Sep 2021 13:19:56 -0400 by xSN1PERxEL1TEx

The bottom layer implements the K-means + + algorithm and is used to find data outliers

preface In this article, we solve the problem of outlier screening using the data of the overall dimension based on our own defined methods rather than calling ready-made modules, and finally visually display the results. Years are like clouds, bandits I want to save, and writing is not easy. I hope friends passing by will praise, collect ...

Posted on Sat, 25 Sep 2021 07:42:00 -0400 by dgudema

XCTF - attack and defense world CTF platform Reverse reverse class - 53, easyCpp

Download the attachment easyCpp and check the file information first: It is a 64 bit ELF file under Linux. Run the program: Is a program that inputs a string and then determines whether it is correct. If there is an error, enter "You failed!" Then open with IDA64: main function source code and comments: int __cdecl main(int arg ...

Posted on Sat, 25 Sep 2021 05:31:55 -0400 by kausee

LeetCode linked list questions

1, Determine whether it is a ring linked list Leetcode 141 question: circular linked list Solution idea: speed pointer Set two pointers, one step at a time is called slow pointer, and the other two steps at a time is called fast pointer. When the linked list is acyclic, the fast pointer will reach the end of the linked list first. &nbsp ...

Posted on Sat, 25 Sep 2021 03:38:12 -0400 by Lijoyx

The way for beginners to brush questions (week 2)

According to the Luogu questionnaire, I plan to brush a violent enumeration XD this week Although it is a violent enumeration, the timeout is still timeout (sweat ~) First of all, a method of violent enumeration is to use deep search to solve repeated operations Just like the following combinatorial number topic Combined output - Luogu Wit ...

Posted on Sat, 25 Sep 2021 02:55:01 -0400 by the_lynx123

Sorting -- two-dimensional ring equally divided cards -- Tanabata Festival

Problem description Tanabata Festival has been labeled "Valentine's Day" because of the legend of Cowherd and weaver girl. So TYVJ held an offline Tanabata Festival this year. Vani successfully invited cl to spend Tanabata with him this year, so they decided to go to TYVJ Tanabata Festival.    TYVJ Tanabata Festival is very sim ...

Posted on Fri, 24 Sep 2021 22:10:28 -0400 by pas07920

Common Algorithmic Framework

0 For any data structure, its basic operation is no more than traversal + access, and more specifically: add, delete, check and change. There are many kinds of data structures, but they exist for the purpose of adding, deleting, and altering as efficiently as possible in different scenarios. Is that not the mission of data structures? How to ...

Posted on Fri, 24 Sep 2021 12:25:26 -0400 by arcarocket

Segment tree template + some of my own understanding

After reading it many times, I finally understand something Because the left and right child nodes are often used, first define two functions to calculate the serial numbers of the left and right children: inline lc(int x){return x<<1;} //Left son inline rc(int x){return x<<1|1;}//Right son First, the segment tree uses each nod ...

Posted on Fri, 24 Sep 2021 08:37:21 -0400 by metrostars

Linked list theory based on Algorithm

1. Basic definition of linked list We have summarized the array of one of the two data structures before. This time, we will summarize the other - Linked List. Firstly, the bottom layers of dynamic array, stack and queue all rely on static array; Using resize to solve the fixed capacity problem may cause a lot of waste of memory space (f ...

Posted on Fri, 24 Sep 2021 08:04:08 -0400 by activeserver