Machine Learning Coding Tutorial 1. Hello World

The tutorial is about making a simple machine learning Python program. The program takes a description of the fruit as input and predicts whether it’s an apple or orange as output based on features like its weight and surface texture.

Here we go, a few lines of Python code is all it takes to write your first machine learning program!

1. helloworld.py

Create a python file helloworld.py with any text editor and write following code to program.

Please read comments carefully to understand the meaning of codes.

Run the program with the following command in Terminal (Mac) or Command Prompt (Windows):

Do you see the program predicts a correct result?

Yep. The machine is clever lol.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *