[algorithm] K nearest neighbor algorithm (K-NEAREST NEIGHBOURS (KNN))

KNearest neighbor algorithm (k-nearest neighbours, KNN) algorithm Classifying an element Look at its K nearest neighbor. Among these neighbors, which is more, this element has greater probability than this category.   Use Use KNN to do two basic tasks.Classification and regression:   Classification is grouping.;   Regression is the result of prediction.(For example, a number.   feature extraction Used to determine two elements.Similarity degree   Method Pythagorean formula   Converts a comparable category to a set of coordinates. Pythagorean formula     Regression (regress...

Scan two-dimensional code to become a lower level user.

<div class="header_top bar-nav"> <a class="back-link-icon" href="#pageHome" data-rel="back"></a> <h1 class="page-title-bar">My share code < /h1>< /div><! - common top -->< div class= "wallet-box" >< div style= "width: 100%; height: 11rem; text-align:center" >< img style= "width:100%; height:100%"Src= "/phone/public/images/feixiangpicture.png" />< /div>< div class= "CONT"Style= "display:flex; padding:0 8%; justify-content:space-around;" >< P style= "margin-top: 8%; font-size:.40rem; color:#333 ">"; long cli...

Using gulp and bable to compile ES6 code in real time

This article was first published on my own bloating blog site:Using gulp and bable to compile ES6 code in real time,The blog uses a source of open source, based on thinkjs and vuejs development, welcome you to stroll around.     Problem description> A large and complete Java framework is used in the project development. the framework integrates the front-end and the back-end. the front-end develops JSP pages on the basis of this framework, and the front-end and back-end are not completely separated. Now we have some JS code that uses ES6 syntax, but then we have IE compatibility probl...

MongoDB tutorial (four): MongoDB concept analysis

Summary:   No matter what database we learn, we should learn the basic concepts. In mongodb, the basic concepts are documents, collections, databases, and we’ll cover them one by one.   The following table will help you understand some concepts in Mongo easier.      data base   Run database C:\Program Files\MongoDB\Server\4.0\bin&gt first; mongo.exe show dbs —— Displays a list of all databasesUse -- run"use"Command to connect to a specified database.DB -- Implementation"db" The command can display the current database object or collection.       N...

MySQL common sentences and practical training

> input Description: nothing output Description: emp_no birth_date first_name last_name gender hire_date 10008 1958-02-19 Saniya Kalloufi M 1994-09-15   The answer:select * from employees order by hire_date desc limit 0,1; 1 2     second questions:     Find all staff members with the third lowest ranking time of entry staff.CREATE TABLE `employees` (`emp_no` int(11) NOT NULL,`birth_date` date NOT NULL,`first_name` varchar(14) NOT NULL,`last_name` varchar(16) NOT NULL,`gender` char(1) NOT NULL,`hire_date` date NOT NULL,PRIMARY KEY (`emp_no`)); > input Description: nothin...

Three paradigms of database

First normal form (1NF):Emphasis is placed on atomicity of columns, that is, columns can not be further divided into other columns.  Consider such a table: “contact” (name, gender, telephone).If in the actual scenario a contact has a home phone and a company phone, the meter structure is not designed to reach 1NF. To conform to 1NF, we simply split the columns, i.e. [contacts] (name, sex, home phone, company phone). 1NF is a good judge, but2NF and 3NF are easy to mix up.◆ Second normal form (2NF):The first is 1NF, which contains two other parts. The first is that a table must h...

Dichotomy search JS algorithm

dichotomy search algorithm:When dichotomy is used to search, data needs to be arranged in order.The main idea is: (set the array interval to find is array[s, e]).(1)Determine the middle position of the interval M(2)Comparing the search value T with array [m], if the search is equal, the search returns to this location successfully; otherwise, the new search area is determined and the binary search continues.The area is as follows:Array is arranged from small to large.array[m]>TFrom the order of arrays, we can see array[m,… E]> T;Therefore, the new interval is array[s,R...