Posts

Showing posts with the label datamining_en

Logistic Regression - Tell us "Yes" or "No"

Image
Another regression model called Logistic regression is used to describe the relationship between the categorical dependable variable and independable variables with logistic function and estimate the probabilities of binary response. The output variable in logistic regression is categorical rather than interval. You might have heard the terms, Classification, which is one of common applications in data mining or automatic pattern recognition. We can classify the binary, ordinal or nominal target variables by performing Logistic Regression. In this tutorial, only binary target variables ("Yes", "No") is taken as example of classification in application since it is less complicated for beginner to get a grip on. Formula: $$ln(\frac{p}{1-p}) = w_0 + w_1x_1 + w_2x_2+...+w_nx_n=\sum_{i=1}^{m}{w_ix_i}=w^Tx$$ The probability of being "Yes", $p$ can be expressed as below by modifying above formula. If the probability exceeds the threshold (generally 0.5), the...

Linear Regression - Simple model for statistics and prediction

Image
No doubt that Linear Regression are competent to be applied to different aspects and purposes. It can be an approach to describe the relationship between the independent variables ($x_i$) and dependable variable ($y$), or predict the target variables ($y$ ) with the inputs ($x_i$). It also helps us to understand how much effect on change of dependent variable, when changing one or more independent variables. Formula: $$y = w_0+w_1x_1+w_2x_2+ ... +w_nx_n$$ It is also presented as: $$h_w(x)=\sum_{i=1}^{m}{w_ix_i}=w^Tx$$ Cost Function is defined as sum of square of difference between $h_w(x^{(j)})$ and $y^{(j)}$. In statistics, it is called sum of square error, SSE. In order to fit the straight line to $n$ data points, cost function / SSE needs to be minimized to achieve the optimization goal.  $$J(w)=\sum_{j=1}^{m}{h_w(x^{(j)})-y^{(j)})^2}$$ Think it intuitively, the less difference between predicted and actual target values, the predictive model is giving the result which...

Scikit-learn - Powerful package of machine learning algorithm in Python

Scikit-Learn is a famous package of machine learning in Python, that are contributed by the community. Most of the processes involving data mining including data processing, model training and validation and assessment are available in this module. Some highlighted algorithms of Regression, Decision Tree, Clustering are allowed to satisfy our analytic needs. Recently, I am glad to find a new class of Artificial Neural Network for supervised learning in the new version. Really cannot wait for the latest version of scikit-learn! So, install Scikit-Learn first! Mac Open the terminal and type: pip install scikit-learn Window Open the CMD: pip install scikit-learn Ubuntu Open the terminal and type: pip install --user --install-option="--prefix=" -U scikit-learn Let's enjoy the journey of data mining in data jungle with Scikit-learn!

Data Mining - Overview of data mining process

Image
As mentioned in previous article , data mining, as known as Knowledge Discovery in Database, is process of extracting useful information from unstructured data. The data mining model is also included but not limited to machine learning algorithm. How does it work? To understand about the big picture of data mining process, this is visualized as below: Data Integration These dispersed data distributed into multiple database are integrated into say, data warehouse. Its purpose to prepare the raw data for further processing. In normal practice, a table format with attributes (column), records (row). Sampling Most of data mining models involve complex algorithm and frequently compute. If the data size is too large to be analyzed, sampling is indispensable to reduce the time spending on computation. There are several methods such as simple random, systematic sampling, clustering to achieve reducing the amount of data. Data Exploring So as to observe the structure of the data ...

Data Mining - Machine Learning = Data Mining ?

Image
Machine learning (ML), one of branch of Artificial Intelligence (AI). Arthur Samuel defined it as the field of study that gives computers the ability to learn without being explicitly programmed in 1959. As a result, experts tends to pay attention to the study, design and development of the algorithms. Data Mining (DM) is defined as the process of extract the useful information or knowledge from unstructured data. Practically, the algorithms in machine learning is used as tools to extract the information. Consequently, the purposes of DM and ML are not the same but there is still the overlap areas which is the models in machine learning. It is the reason that you could see the famous model such as Artificial Neural Network and Support Vector Machine occur in these two subject areas simultaneously. Having understood the the difference between data mining and machine learning, another question is raised that what the difference of classification and prediction is. We usually ...

Data cleansing - Enhance your data quality

Image
Most of time, there is inaccurate or wrong data due to system bugs or human-input error. In fact, these kind of unexpected error usually occurs in our database and occupied certain proportion of overall observations. "Quality data, quality results." This statement is valid especially when we generate the summary report with statistics. Any missing or duplicated records could mislead the statistical results. Additionally, we sometimes find the abnormal value for some attribute (say zero transaction amount)  in a record. For predictive modelling in machine learning, outliers with extreme value are kicked out besides the improper data to prevent from affecting the model performance. When studied in the university, I usually neglected the importance of cleansing the data. The reason seems to be my curiosity of studying the analytical method is far away from that of processing the data. Of course, I have learned the lesson from my own jobs and awarded the significance of dat...