The basis of artificial intelligence - the expansion of search tree and n queen problem

Greedy Algorithm Algorithm principle Greedy algorithm also belongs to A heuristic algorithm. Greedy algorithm never pays attention to the whole, but always selects the optimal solution based on the current state. Greedy can be regarded as A special case of A * In the previous blog, we already know that the comprehensive priority of A * algo ...

Posted by dopey on Wed, 27 Oct 2021 05:57:03 -0700

Data structure - time complexity and space complexity

1, Algorithm efficiency What is an algorithm? Generally, people define an algorithm as a finite set of instructions, which specify an operation sequence to solve a specific task. An algorithm should have the following characteristics Have inputHave outputcertaintyPovertyfeasibility There is always a standard for the quality of t ...

Posted by Dtonlinegames on Wed, 27 Oct 2021 02:22:39 -0700

Python implementation of CART decision tree algorithm (detailed comments)

1, Introduction to CART decision tree algorithm CART (Classification And Regression Trees) algorithm is a tree construction algorithm, which can be used for both classification tasks and regression. Compared with ID3 and C4.5, which can only be used for discrete data and classification tasks, CART algorithm has a much wider application. It can ...

Posted by elklabone on Wed, 27 Oct 2021 00:59:01 -0700

Prefix sum and difference

Prefix and Enter a sequence of integers of length n. Next, enter m more queries, and enter a pair of l,r for each query. For each query, the sum of the number l to the number r in the original sequence is output. Input format The first line contains two integers n and m. The second row contains n integers, representing the integer sequenc ...

Posted by razta on Tue, 26 Oct 2021 08:14:35 -0700

Machine learning practice - decision tree

1, Construction of decision tree decision tree is a kind of common machine learning algorithm. It makes decisions based on tree structure. Step by step from the root node to the leaf node (decision). All data will eventually fall to leaf nodes, which can be classified or regressed. Decision tree Advantages: the calculation complexity ...

Posted by barrowvian on Tue, 26 Oct 2021 03:51:20 -0700

Python implements multiple linear regression algorithm to predict house prices

1, Multiple linear regression The changes of socio-economic phenomena are often affected by multiple factors. Therefore, multiple regression analysis is generally required. We call the regression including two or more independent variables as multiple linear regression. The basic principle and calculation process of multiple linear regr ...

Posted by barbs75 on Mon, 25 Oct 2021 15:54:43 -0700

sougou search app weixin official account list so encryption algorithm analysis reduction RSA encryption Base64 analysis

For study and research only. Please do not use it for illegal purposes. I will not bear any legal responsibility. Recommended reading Using unidbg hook inline hook Using unidbg console debugger sougou search app weixin official account list so encryption algorithm analysis of reduction analysis simple analysis sougou search app weixin offi ...

Posted by new7media on Sun, 24 Oct 2021 19:52:27 -0700

Sorting algorithm clock in

Quick row Based on the idea of divide and conquer Template questions: Give you a sequence of integers of length n. Please use quick sort to sort this sequence from small to large. And output the ordered sequence in order. Input format The input consists of two lines. The first line contains the integer n. The second row contains n integ ...

Posted by corsc on Sun, 24 Oct 2021 08:26:45 -0700

Self defined distance measurement method of clustering algorithm in scikit learn Library

Scikit learn is a very beautiful one machine learning Libraries. Sometimes, using these libraries can save you a lot of time. At least, we can use them Python , it should be difficult to write such fast code Scikit learn has some official documents, but personally, I don't think many things in its documents are clear. When it says the principl ...

Posted by LMarie on Sun, 24 Oct 2021 06:23:17 -0700

[1024 Carnival] collection of OJ questions in the classic linked list of Li Kou

I will upload all the source codes of the current force deduction questions to my code cloud warehouse, Let me see the warehouse Write in front First of all, I wish you a happy Carnival! This is our holiday To pay tribute to 1024, today's force buckle series is no longer a question, but a combination of multiple questions Also with our rec ...

Posted by MnilinM on Sun, 24 Oct 2021 04:49:18 -0700