Get Machine Learning Flow in 10 Minutes

kagula

Feb-28-2023

Introduction

         Given a Machine Learning flow with the most straightforward example by python.

Prerequisites

  • JupyterLab 3.4.4
  • Python 3.9

Content

Machine Learning Flow

pic 1. Machine Learning Flow

        Commonly, Machine Learning Flow has 7 steps. 

Step1: Import the Data

        Collect data that you need to train the Model. 

Step2: Clean the Data

        Organize the data and classify the data into a table sheet and remove irrelevant, duplicated, incomplete data. Converting the text-based value to numerical values, for example, we assumption gender is only having male or female we can use 0 to 1 to substitute. commonly, the table sheet is in Excel format.

         The format of the sheet is usually as below pattern

X1 in col1...XN in col NY in col N+1
The First Record............
...............
The Last Record............

        As the set of Y = function (X1, ..., XN), X1 to XN are variables for input and Y is the output, where N is natural number which is equal or greater than 2.

        The model is to extrapolate the relationship between input and output with limited data, that relationship is the pattern getting from training.

Step3: Split the Data into Training/Test Sets

        Generally, we need more than 80% percent data for training and the rest of the data is to test the pattern which is generated by training.

Step4: Create a Model

        We need a model to train. A model is the algorithm of Machine Learning for looking for pattern between input and output. Here X1 to XN is the input, Y is the output. Generally, we use Decision Tree or Neuro Network algorithm. in the next example of Python, we will use the Decision Tree algorithm.

Step5: Train the Model

        Get the pattern from training the data by the selected Model.

Step6:Make Prediction

        Now we can use the test data to check the accuracy of pattern.

Step7: Evaluate and Improve

        We have the rest of the input and output data to check pattern accuracy. If the accuracy is not satisfying our need, we can fine-tune the parameters of model and use more abundant and accurate data to train. How to fine-tune the parameters of model reference the tutorial of scikit library.

An Example with Python

First step, prepare sample

        Get the Data that you need to feed the Model of Machine Learning.

        You can download the music.csv from My CSDN Resource Share, in the file is fake data only intent for illustrate the concept.

Last step, get the Machine Learning code and run it

input and run the Python snippet that I gave you.

 Pic2. Hello World of Machine Learning

        Now you already get the concept, the next step is to read the tutorial of the Sklearn library.

Reference

  1. <<Python Machine Learning Tutorial (Data Science)>> by 'Programming with Mosh' 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kagula086

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值