Day 11 | Artificial Intelligence and Machine Learning: Task 1


Posted on: July 27th, 2020

Day 11 | Artificial Intelligence and Machine Learning: Task 1

Date: 05.07.2020


Task 1

Title: Linear Regression in Python for machine learning.

Software used: Python 2.7, Jupyter Notebook, Pandas, Scikit-learn, Pickle, Numpy, GhCpython,

MS Excel.

Tools Used: Python 2.7, Jupyter Notebook, Scikit-learn, Pickle, Numpy, GhCpython Script.

The session was to learn scripting in Python and understand fundamentals of Machine Learning. The data used was from the project used in the previous day session. Analysis was done through linear regression method in python using scikit learn interface.

Importing interfaces; numpy,pandas,scikit-learn, pickle and data from excel file in jupyter notebook. Pickle is used to convert input data into binary form and vice versa for output data.


Extracting objects in ’0’ row from excel file and returning Data values into individual rows.


Diagram showing logistics of data when split in sets as testing set and training set in Python ML. The mathematical expression is the approach that ML runs through when a linear regression method takes place.


Data being split into train sets and test sets. ‘predict’ returns the learned object in the array.


Regression being done for the train set and test set for ‘absolute mean error’, ‘mean square error’ and ‘root mean square error’.


Values being added to the Cpython script from excel.


Final outcome from GhCpython in grasshopper.


Read More: