Data Science Review: Intro to ML I

intro-to-ml

How Models Work

Fundamentals of machine learning models are finding patterns from dataset and making prediction using the pattern they learned. The process of finding pattern from given data set is called fitting or training. The data used to fit the model is called training data. After the model has been fit, you can apply new data to make prediction.

Decision Tree

Decision tree is one of machine learning models that uses tree structure to construct prediction model. Take a look at the diagram below.

decision-tree

The model above goes through series of factors that "splits" into predictions. You can construct "deeper" decision trees by capturing more factors.

Model Validation

Model validation is a process of evalutating your model to see how good it is. A model is evaluated by comparing its predictions to the actual values. The dataset used to evaluate the model is called validation data. It is important not to use same data for training and validation training because it can lead to overfitting.

  • Overfitting is a phenomemenon where the model matches the training data perfectly, but does poorly in validation.

  • Underfitting is when model fails to capture critical patterns in the data and does poorly in both training and validation data.

mae

Random Forest

Random Forest are prediction model consisting multitple decision trees. It makes prediction my averaging the prediciton of each component tree. It generally produces more accurate prediction than a single decision tree.

rf

Links