[UCAS Natural Language Processing Assignment 1] Use BeautifulSoup to crawl Chinese and English data, calculate entropy, and verify Zip’s law

Article directory Preface Chinese Data crawling Crawl interface Crawl code Data cleaning data analysis Experimental results English Data crawling Crawl interface Dynamic crawling Data cleaning data analysis Experimental results in conclusion Foreword This article crawls Chinese and English corpora respectively, and calculates their corresponding entropy in the two languages to verify Zip’s law. github: ShiyuNee/python-spider […]

Modification of TOPSIS model based on entropy weight method

Last time we mentioned that using the analytic hierarchy process to determine the weight of indicators is too subjective. Using the entropy weight method can assign values more objectively. Let’s talk about the application of the entropy weight method. From the definition, we can see two new terms, one is the degree of variation, and […]

Python handwritten maximum entropy model

Python handwritten maximum entropy model 1. Algorithm mind map #mermaid-svg-PqhjsEKAz9Njm4Ma {font-family:”trebuchet ms”,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-PqhjsEKAz9Njm4Ma .error- icon{fill:#552222;}#mermaid-svg-PqhjsEKAz9Njm4Ma .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-PqhjsEKAz9Njm4Ma .edge-thickness-normal{stroke-width:2px;} #mermaid-svg-PqhjsEKAz9Njm4Ma .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-PqhjsEKAz9Njm4Ma .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-PqhjsEKAz9Njm4Ma .edge- pattern-dashed{stroke-dasharray:3;}#mermaid-svg-PqhjsEKAz9Njm4Ma .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-PqhjsEKAz9Njm4Ma .marker{fill:#333333;stroke:#333333; }#mermaid-svg-PqhjsEKAz9Njm4Ma .marker.cross{stroke:#333333;}#mermaid-svg-PqhjsEKAz9Njm4Ma svg{font-family:”trebuchet ms”,verdana,arial,sans-serif;font-size:16px ;}#mermaid-svg-PqhjsEKAz9Njm4Ma .label{font-family:”trebuchet ms”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-PqhjsEKAz9Njm4Ma .cluster-label text{fill: #333;}#mermaid-svg-PqhjsEKAz9Njm4Ma .cluster-label span{color:#333;}#mermaid-svg-PqhjsEKAz9Njm4Ma .label text,#mermaid-svg-PqhjsEKAz9Njm4Ma span{fill:#333;color:#333; }#mermaid-svg-PqhjsEKAz9Njm4Ma .node rect,#mermaid-svg-PqhjsEKAz9Njm4Ma .node circle,#mermaid-svg-PqhjsEKAz9Njm4Ma .node ellipse,#mermaid-svg-PqhjsEKAz9Njm4Ma .node polygon,#mermaid -svg-PqhjsEKAz9Njm4Ma .node path {fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-PqhjsEKAz9Njm4Ma .node .label{text-align:center;}#mermaid-svg-PqhjsEKAz9Njm4Ma .node.clickable{cursor:pointer ) […]

Quantification method of indicator importance Entropy Weight Method

01.Definition In the previous article, we introduced the analytic hierarchy process, but this method has certain limitations: evaluation is highly subjective. But in actual data evaluation and analysis, we need more objective method evaluation. This article introduces an objective weighted data analysis method – the entropy method. Entropy Weight Method is a method commonly used […]

Java combines GIS training algorithm to achieve maximum entropy

Resource download address: https://download.csdn.net/download/sheziqiong/88284338 Resource download address: https://download.csdn.net/download/sheziqiong/88284338 MaxEnt This is a concise Java implementation of maximum entropy, providing training and prediction interfaces. The training algorithm uses the GIS training algorithm, and comes with a sample training set and a weather forecast demo. MaxEnt training and prediction Call method public static void main(String[] args) throws […]

Softmax, Cross-entropy Loss and Gradient derivation and Implementation

Table of Contents 1. Overview 2. Sigmoid function 3. Softmax function 3.1 Definition 3.2 Partial derivatives of softmax function 3.3 Gradient of softmax function 3.4 python implementation of softmax and its gradient 4. cross-entropy loss 4.2 logistic loss 4.3 logistic loss gradient 4.4 cross-entropy loss 4.5 cross-entropy loss gradient 5. Gradient of “softmax + cross-entropy” […]

Optimal transmission algorithm implemented using Julia: Earth-Mover (Wasserstein) distance, Sinkhorn entropy regularization and its variants exploration

Part One: 1. Introduction Measuring the difference between two probability distributions is very important in fields such as number processing, machine learning, and image recognition. Among them, the optimal transmission algorithm provides a powerful framework for this requirement. The core concept of the algorithm is to find the “minimum” transfer cost between two distributions, that […]

P02114200 Qi Qi, P02114213 Yang Jiaru, P02114193 Wei Ziang, P02114105 Jiang Qi, P02114208 Gu Zihao–Research and Expansion of the Proof of Additivity and Incrementality of Information Entropy

Directory 1. Preliminary knowledge 2. Proof process 2.1. Proof of information entropy additivity 2.2. Proof of increasing information entropy 3. Expansion 3.1 Extension of Additivity 3.2 Incremental expansion 3.3 Information grains and decision trees 3.3.1. Information Granules 3.3.2. Information entropy and information granularity 3.3.3. Decision tree 3.3. 4. Information granule and decision tree 3.3.5. Conclusion […]

CrossEntropy (cross entropy loss function pytorch)

Introduction The crossentropy loss function is mainly used for multiple classification tasks. It calculates the cross-entropy loss between the model output and the real label, which can be used as the objective function for model optimization. In a multi-classification task, each sample has multiple possible categories, and the model outputs the probability distribution that each […]