skewness = skewness[abs(skewness) > 0.75] print("There are {} skewed numerical features to Box Cox transform".format(skewness.shape[0])) from scipy.special import boxcox1p skewed_features = skewness.index lam = 0.15 for feat in skewed_features: #all_data[feat] += 1 all_data[feat] = boxcox1p(all_data[feat], lam) help(boxcox1p)
Help on ufunc object: boxcox1p = class ufunc(builtins.object) | Functions that operate element by element on whole arrays. | | To see the documentation for a specific ufunc, use `info`.

Maximum Likelihood Estimation The training process of probability model is parameter estimation.Bayesian school thinks that the parameters are unobserved random variables and may have their own distribution, so it can be assumed that the parameters obey a prior distribution, and then calculate the posterior distributions based on the observed data.The frequency school thinks that although the parameters are unknown, they have objective fixed values, so the parameters can be determined by optimizing likelihood functions.

The classification problem of a text (the meaning of the two words "text" and "document" is basically not distinguished below) is to classify a document into one or more of several predefined categories, and the automatic classification of text uses a computer program to realize such classification.To put it more bluntly, it's like taking an article and asking the computer whether the article is about sports, economy or education. If the computer can't answer it, it will spank it (…).

All codes in this article are stored in bayes.py file, which is convenient for code testing and program running. from numpy import * def loadDataSet(): """ 功能：词表到向量的转换函数 输出：1.进行此条切分后的文档集合。2.类别标签的集合，这些文

Resource Sharing: 1, po a free stop word download:https://blog.csdn.net/u010533386/article/details/51458591After copying, paste and save to txt file.Then use python to read the txt file and pay attention to the statement:
stpwrdlst = open(stopword_path).read().replace('\n', ' ').split()
to adjust the format, otherwise the program will appear warning:
UserWarning: Your stop_words may be inconsistent with your preprocessing. Tokenizing the stop words generated tokens [·····] not in stop_words. sorted(inconsistent))
blog notes: 1, machine learning related:1.

five-step method The five-step method, as the name implies, uses a mathematical model to solve practical problems in five steps.It includes the following five steps: Ask questions Select Modeling Method deduces the mathematical expression of the model solution model Answer questions The first step is to ask questions, that is, to use appropriate mathematical language to express the actual problems encountered.Generally speaking, the first task is to define the terms.No

Original Address: Naive Bayes Classifiers
This paper discusses the theory behind Naive Bayes classifiers and its implementation.
Naive Bayesian classifier is an algorithm based on Bayesian theory in the set of classification algorithms.It is not a single existence, but an algorithm family, in which they all have common rules.For example, each classified feature pair and other feature pairs are independent of each other.
Before you start, look at the dataset.

Recently, I have been working on a short text classification system. I have tried to use Naive Bayesian algorithm to make a baseline model (this algorithm was not adopted in the end). Naive Bayesian method is a very simple and efficient classification algorithm. This algorithm has been watched several times intermittently. Today, I will make a summary. The contents refer to Li Hang's Statistical Learning Method and Goodfellow's Deep Learning.

Toutiao: 1. Intel Wireless Charging Dramatically Draws Down and Businesses Lay Off Staff;2.IDC: Global Mobile Phone Assembly Factory Shipment Ranking in the First Quarter;3. U.S. research found that cell phone use is associated with cancer.4. Zhejiang police destroyed the industrial chain of stolen and sold Apple mobile phones worth more than 100 million yuan.5. Finnish government accuses Microsoft of Nokia Von Trapped;6. CTS Technology in China Fines US$ 34.9 Million