Machine learning Note 6: integrated learning at the bottom of Python

preface In the supervised learning algorithm of machine learning, our goal is to learn a stable model with good performance in all aspects, but the actual situation is often not so ideal. Sometimes we can only get multiple preferred models (weak supervised model, which performs better in some aspects). Three cobblers make Zhuge Liang. Ensemble ...

Added by simmsy on Wed, 19 Jan 2022 19:45:47 +0200

LeetCode-139 - word splitting

Word splitting Title Description: given a non empty string s and a list wordDict containing non empty words, determine whether s can be divided into one or more words in the dictionary by spaces. explain: Words in the dictionary can be reused when splitting. You can assume that there are no duplicate words in the dictionary. See LeetCode's o ...

Added by DF7 on Wed, 19 Jan 2022 18:21:58 +0200

JAVA: two point exercise -- previous test question interval displacement

1, Problem description There are n closed intervals D1,..., Dn on the number axis. The interval Di is described by a pair of integers [ai, bi], which satisfies AI < Bi. It is known that the sum of the lengths of these intervals is at least 10000. Therefore, by appropriately moving these intervals, you can always make their "union& ...

Added by Chips on Wed, 19 Jan 2022 16:40:21 +0200

Java -- Interpretation of HashMap source code (Java jdk1.7)

Core parameters /** * The table, resized as necessary. Length MUST Always be a power of two. */ transient Entry<K,V>[] table = (Entry<K,V>[]) EMPTY_TABLE; /** * The number of key-value mappings contained in this map. */ transient int size; /** * The next size value at which to resize ...

Added by jackthebookie on Wed, 19 Jan 2022 16:24:08 +0200

Data structure and algorithm: the basic part of tree structure

Basic part of tree structure 1, Binary tree 1. Why do you need a tree data structure 1.1 analysis of array storage mode Advantages: it is fast to access elements by subscript. For ordered arrays, binary search can also be used to improve the retrieval speed. Disadvantages: if a specific value is to be retrieved, or the inserted value (in a ...

Added by ealderton on Wed, 19 Jan 2022 14:01:14 +0200

Codeforces 1547f array stabilization (GCD version)

Title Link: Array Stabilization (GCD version) General meaning Given an array of length n, the subscripts are from 1 to n. where an and a1 are connected (form a ring) Each round of operation yields a new array b: for all I ∈ [1, n], b[i] = gcd(a[i], a[i + 1]) (b[n] = gcd(a[n], a[1]) Finally, copy the new array b to the original array a ...

Added by john-iom on Wed, 19 Jan 2022 11:52:20 +0200

Analyze and understand jdk1 put() method of HashMap, version 8 Java collection

HashMap is the most commonly used key value collection in java. It is necessary to understand its principle and underlying code. Today, record the of HashMap Research and analysis of put() method (element addition method); First, let's talk about the results of personal research and analysis: During instance initialization, HashMap does ...

Added by a1amattyj on Wed, 19 Jan 2022 00:01:02 +0200

Continuous update of search topics (BFS, DFS) - Luogu topic

Search - Luogu 1, Traversal of horses Title Link: P1443 traversal of horse - Luogu | new ecology of Computer Science Education (luogu.com.cn) Title Description There is an n * m chessboard. There is a horse at a certain point (x, y). You are required to calculate how many steps it takes for the horse to reach any point on the chessboard. (f ...

Added by rob.weaver on Tue, 18 Jan 2022 23:58:20 +0200

Cryptography: encryption mode and padding mode and message digest

catalogue Encryption mode ECB CBC Fill mode NoPadding PKCS5Padding Tips Message summary characteristic Get string message summary base64 encoding Other digital summarization algorithms Get file message summary Encryption mode Encryption mode: https://docs.oracle.com/javase/8/docs/api/javax/crypto/Cipher.html ECB ECB: electroni ...

Added by gevensen on Tue, 18 Jan 2022 23:44:42 +0200

Summary of common sorting algorithms

Bubble sorting Bubble sorting is a process of comparison There are two layers of loops. The outer layer actually controls the number of times. Each cycle will have a maximum value exchanged to the tail Then you don't need to bring it on the next cycle Each inner layer cycle will be compared from the beginning to the end Only the latter of t ...

Added by timgolding on Tue, 18 Jan 2022 20:18:43 +0200