hope for in the earthquake prediction is that the recall is very high, that is to say, every earthquake we want to predict. We can sacrifice precision at this time. 1000 alarms are preferred, 10 earthquakes are predicted correctly, and do not predict 100 times 8 leaks two times.
Suspects convictedBased on the principle of not blaming a good man, we hope to be very accurate about the conviction of a suspect. In time, some criminals were spared (recall low), but also worthwhile.
Regressi
A simple introduction to machine learning algorithms.As the team (Big Data Team) technology development needs, through the traffic business data needs to expand, to achieve data mining and data analysis technology mastery, bypassing the machine learning algorithm, it can be said that the core value of big data lies in
') plt.ylabel (' Ratio_sugar ') plt.title (' LDA ') plt.show () W=calulate_w () plot (W)The results are as follows: The corresponding W value is:[ -6.62487509e-04, -9.36728168e-01]Because of the relationship between data distribution, LDA's effect is not obvious. So I changed the number of samples of several label=0, rerun the program to get the result as follows:The result is obvious, the corresponding W value is:[-0.60311161,-0.67601433]Transferred from: http://cache.baiducontent.com/c?m= 9d7
In the process of machine learning, we often meet the problem of fitting. The high dimension of input data or features is one of the problems that lead to overfitting. The higher the dimension, the more sparse your data will be in each feature dimension, which is basically catastrophic for machine learning
Recently learned about Python implementation of common machine learning algorithms on GitHubDirectory
First, linear regression
1. Cost function2. Gradient Descent algorithm3. Normalization of the mean value4. Final running result5, using the linear model in the Scikit-learn library to implement
Second, logistic regression
1. Cost funct
the curve is above the Curve.The common convex functions are:
exponential function f (x) =ax;a>1
Negative logarithm function? logax;a>1,x>0
Two-time function of opening up
The decision of the convex function:1, If F is a first-order, x, y in any data domain satisfies F (y) ≥f (x) +f′ (x) (y?x)2. If f is a differentiable guide,Examples of convex optimization applications
SVM: which consists of max|w| Turn min (12?| W|2)
Least squares?
The loss function of L
Nine algorithms for machine learning---regressionTransferred from: http://blog.csdn.net/xiaohai1232/article/details/59551240Regression analysis is to quantify the size of the dependent variable affected by the independent variable, to establish a linear regression equation or a nonlinear regression equation, so as to predict the dependent variable, or the interpr
, example to get the classification result of Class 1The same input is transferred to different nodes and the results are different because the respective nodes have different weights and biasThis is forward propagation.10. MarkovVideoMarkov Chains is made up of state and transitionsChestnuts, according to the phrase ' The quick brown fox jumps over the lazy dog ', to get Markov chainStep, set each word to a state, and then calculate the probability of transitions between statesThis is the proba
This section learns to use Sklearn for voting classification, see a specific example, the dataset uses the Iris DataSet, using only the sepal width and petal length two dimension features, Category we also only use two categories: Iris-versicolor and Iris-virginica, the standard uses ROC AUC.Python Machine learning Chinese catalog (http://www.aibbt.com/a/20787.html)Reprint please specify the source, Python
minimizing the degree of impurity at each step, the cart can handle the outliers and be able to handle the vacancy values. The termination condition of the tree partition: 1, the node achieves the complete purity; 2, the depth of the tree reaches the depth of the user3, the number of samples in the node belongs to the user specified number;Pruning method of tree is a pruning method of cost complexity;See details: http://blog.csdn.net/tianguokaka/article/details/9018933 Copyright NOTICE: This ar
, the message is the probability of classification C, when the word appears more time, will come to the problem of accuracy, you can dissolve the problem into a joint probability, that is, the probability of each word to find P (c| Wi), and then take out the probability of the largest topn to solve, such as n=10,n=15, and so on, the joint probability formula is as follows:
p=p1*p2*p3*....pn/(p1*p2*p3*....pn+ (1-P1) * (1-P2) * (1-P3) ... * (1-PN)), where P1-PN is our chosen topn probability.
1. Linear modelSimple form, easy to model, good explanatory2. Logistic regressionNo prior assumptions about the data distribution;Approximate probability prediction can be obtained.Many numerical optimization algorithms can be directly used to calculate the optimal solution for the convex function of arbitrary order of the rate function.3. Linear discriminant Analysis (LDA)When two kinds of data are the same as prior, Gaussian distribution and covaria
MySpace qizmt is a mapreduce framework designed to run and develop distributed computing application projects running on Windows Server large-scale clusters. MySpace qizmt is an open-source framework initiated by MySpace to develop trustworthy, scalable, and super-Simple distributed application projects. Open Source Address: http://code.google.com/p/qizmt /.
Infer. NET is an open-source framework that runs Bayesian inference in graphical mode. It is also used for ProbabilityProgramDesign. Open
(First chapter above)1.2.5 Linalg Linear Algebra LibraryBased on the basic operation of matrices, the Linalg Library of NumPy can satisfy most linear algebra operations.. determinant of matrices. Inverse of the Matrix. Symmetry of matrices. The rank of the matrix. The reversible matrix solves the linear equation1. Determinant of matrices from Import * in[#N-order matrix determinant operation in [6]: A = Mat ([[[1,2,3],[4,5,6],[7,8,9]]) in [print]det (A):"6.66133814775e-162. Inverse of the Matrix
Decision tree is to select the most information gain properties, classification.The core part is to use information gain to judge the classification performance of attributes. The information gain is calculated as follows:Information entropy:Multiple categories are allowed.Calculates the information gain for all attributes, choosing the largest root node as the decision tree. Then, the sample branches, continuing to determine the remaining properties of the information gain.Information gain has
ReferenceNB: High efficiency, easy to implement;LR: Less assumptions about data, strong adaptability, can be used for online learning, and the requirement of linearDecision tree: Easy to interpret, independent of data linearity or not; easy overfitting, no online supportRF: Fast and scalable, with few parameters, possibly over fittingSVM: High accuracy, processing of non-linear sub-data (high-dimensional data processing); Memory consumption, difficult
algorithm to initially estimate the number of K.2) How to choose the initial K pointsThe common algorithm is random selection. But often the effect is not very good, also can be similar to the method, the line uses the hierarchical clustering algorithm to divide the K clusters, and uses these clusters ' centroid as the initial centroid.3) method of calculating distancesCommonly used such as European distance, cosine angle similarity degree.4) Algorithm Stop conditionThe maximum number of iterat
other.Suppose we choose the attribute R as the split attribute, DataSet D, R has K different values {v1,v2,..., Vk}, so d according to the value of R into K-group {d1,d2,..., Dk}, after splitting by R, the amount of information required to separate the different classes of DataSet D is:information gain is defined as before and after the split, two of the amount is only poor:The following example uses Python to illustrate a decision tree construct using the information gain method:The main steps
application thread exists in the contents of the set logs, and modify the corresponding remembered sets, this step needs to pause the application, parallel running.Survival Object calculation and cleanup ( Live Data counting and Cleanup )It should be noted that in G1, it is not that final marking pause is executed, it is certain to perform cleanup this step, because this step needs to suspend the application, G1 in order to achieve quasi-real-time requirements, It is necessary to reasonably pla
Logistic regression is used to classify, and linear regression is used to return.Linear regression is the addition of the properties of the sample to the front plus the coefficients. The cost function is the sum of squared errors. Therefore, in the minimization of the cost function, you can directly derivative, so that the derivative equals 0, as follows:Gradient descent can also be used to learn the same gradient as the logistic regression form.Advantages of linear regression: simple calculatio
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.