[PYTHON] Introduction to Machine Learning: How Models Work

scenario

A close friend living overseas earned tens of millions of yen by investing in real estate. I want to spread my business, so I invite you to become a business partner. He spends money and creates a pattern (model) for you with data analysis skills to predict the price of a property.

Decision Tree

You asked, "How do you predict and judge the price of a property?" I answered, "It's intuition." Isn't it possible to create a price forecast model intuitively by machine learning? Hearing in more and more detail, you somehow found out. simple-decision-tree.JPG

Property prices are divided into two groups.

In other words, the property price is predicted in the following two steps.

  1. Divide the property into two groups
  2. Set the price for each group

This procedure is called a fitting model or training model. The data that fits the model is called training data.

Use the fitted model to predict the price of the property you are investing in.

Improve the model

Which decision tree fits the training data? which-tree.JPG

If you think about it normally, decision tree 1 seems to be better. Larger properties are more expensive than smaller ones, right? However, the property price is not determined only by the size. There are many other factors that affect property prices (location, year of construction, etc.). The decision tree including other factors is as follows. deeper-tree.JPG

Choosing the path that suits the characteristics of the property, the estimated price is at the bottom node of the decision tree. The bottom node with the predicted price is called leaf.

next

The number of branches and leaf value of the decision tree are determined by the data. Next time, let's analyze the data.

Other related articles are here.

Recommended Posts

Introduction to Machine Learning: How Models Work
Introduction to machine learning
An introduction to machine learning
Super introduction to machine learning
Introduction to machine learning Note writing
Introduction to Machine Learning Library SHOGUN
How to collect machine learning data
How to use machine learning for work? 03_Python coding procedure
scikit-learn How to use summary (machine learning)
An introduction to OpenCV for machine learning
Introduction to ClearML-Easy to manage machine learning experiments-
How to enjoy Coursera / Machine Learning (Week 10)
An introduction to Python for machine learning
How to use machine learning for work? 01_ Understand the purpose of machine learning
[Python] Easy introduction to machine learning with python (SVM)
[Super Introduction to Machine Learning] Learn Pytorch tutorials
An introduction to machine learning for bot developers
[Super Introduction to Machine Learning] Learn Pytorch tutorials
[For beginners] Introduction to vectorization in machine learning
How to use machine learning for work? 02_Overview of AI development project
[Learning memorandum] Introduction to vim
Introduction to Deep Learning ~ Learning Rules ~
How to Introduce IPython (Python2) to Mac OS X-Preparation for Introduction to Machine Learning Theory-
Deep Reinforcement Learning 1 Introduction to Reinforcement Learning
[Introduction] How to use open3d
Introduction to Deep Learning ~ Backpropagation ~
An introduction to machine learning from a simple perceptron
How to adapt multiple machine learning libraries in one shot
Introduction to Machine Learning with scikit-learn-From data acquisition to parameter optimization
How to increase the number of machine learning dataset images
Machine learning to learn with Nogizaka46 and Keyakizaka46 Part 1 Introduction
Introduction to Deep Learning ~ Function Approximation ~
[Introduction to Python] How to parse JSON
Introduction to Deep Learning ~ Coding Preparation ~
Introduction to Deep Learning ~ Dropout Edition ~
Introduction to Deep Learning ~ Forward Propagation ~
Introduction to Deep Learning ~ CNN Experiment ~
Python learning memo for machine learning by Chainer Chapter 8 Introduction to Numpy
Introduction to Python Basics of Machine Learning (Unsupervised Learning / Principal Component Analysis)
Before the introduction to machine learning. ~ Technology required for machine learning other than machine learning ~
Python learning memo for machine learning by Chainer Chapter 10 Introduction to Cupy
Machine learning
[Introduction to StyleGAN] Unique learning of anime with your own machine ♬
Python learning memo for machine learning by Chainer Chapter 9 Introduction to scikit-learn
People memorize learned knowledge in the brain, how to memorize learned knowledge in machine learning
How to create a serverless machine learning API with AWS Lambda
[Introduction to Python] How to use class in Python?
Record the steps to understand machine learning
I installed Python 3.5.1 to study machine learning
Introduction to Deep Learning ~ Convolution and Pooling ~
How to work with BigQuery in Python
How to study deep learning G test
[Python] Saving learning results (models) in machine learning
Introduction to Machine Learning-Hard Margin SVM Edition-
Introduction to TensorFlow-Machine Learning Terminology / Concept Explanation
[Introduction to machine learning] Until you run the sample code with chainer
Take the free "Introduction to Python for Machine Learning" online until 4/27 application
Python beginners publish web applications using machine learning [Part 2] Introduction to explosive Python !!
Introduction to Statistical Hypothesis Testing with stats models
Introduction to MQTT (Introduction)
Introduction to Scrapy (1)