EME 210
Data Analytics for Energy Systems

What are Neural Networks and Machine Learning

PrintPrint

Read It: What are Neural Networks and Machine Learning?

WHAT ARE NEURAL NETWORKS? 

[00:06:23.94] OK. And I might follow a little bit of a different format than we have usually been following here. I think today we may only have time to go over the conceptual stuff in neural networks. It is a pretty dense subject. And so, we may have to just save all the coding for the subsequent two classes.  

[00:06:44.99] How many people, by the way, have heard of neural networks before? A show of hands. One person. Or artificial neural networks is also a synonymous term there. In what context have you heard about neural networks?  

[00:06:58.45] AUDIENCE: I've heard about them with reference to machine learning.  

[00:07:01.66] EUGENE MORGAN: Yeah. Yeah, so neural networks are a form of machine learning. So, I want to give you this big overview here. And I just want to say that we don't have enough time in this class to cover all these different topics in machine learning. If you want to learn more about machine learning, I mean, there's other courses at Penn State that you can take in either computer science or IST that can cover perhaps not even all of this at once, but different other components than we'll cover in this class, at least, more in depth. So, there's other places that you can learn more about this subject.  

Enter image and alt text here. No sizes!
INSERT IMAGE: L27:Slide 2A

Machine Learning:

[00:07:39.59] So why are we talking about neural networks? Well, I think that this is one of the most used forms of machine learning. And it's also a very flexible tool, adaptable to lots of different situations. And I think it's something that is used quite a lot in the different fields that are covered in the Department of Energy and Mineral Engineering.  

[00:08:04.25] So working with quantitative environmental data or sensor data or data from energy systems, a lot of these are handled with neural networks. And neural networks are becoming a more and more popular tool to innovate these different sectors in the energy industry. So, we're going to be focusing on this quadrant here. I'm going to be going over to the neural network part.  

[00:08:30.55] And the neural networks are a form of regression. So, this is a complicated form of regression. So here, we're focusing on just this little bubble right down here with neural networks. And this gives you some examples of applications of neural networks-- so weather forecasting, market forecasting, estimating life expectancy, population growth, advertising popularity-- just different predictions or forecasts.  


Try It: OPTION 1 GOOGLE COLAB

  1. Click the Google Colab file used in the video here.
  2. Go to the Colab file and click "File" then "Save a copy in Drive", this will create a new Colab file that you can edit in your own Google Drive account.
  3. Once you have it saved in your Drive, try to implement the following code to import a file of your choice by mounting your Google Drive:

Note: You must be logged into your PSU Google Workspace in order to access the file.

from google.colab import drive

drive.mount('/content/drive')

import pandas as pd

df = pd.read_csv('yourfilename.csv')

df # print the dataframe

Once you have implemented this code on your own, come back to this page to test your knowledge.


OPTION 2 : DATACAMP

 Try It: OPTION 2 DataCamp - Apply Your Coding Skills

Dictionaries are a quick way to create a variable from scratch. However, their functionality is limited, so we will often want to convert those dictionaries into DataFrames. Try to code this conversion in the cell below. Hint: Make sure to import the Pandas library.

# This will get executed each time the exercise gets initialized. # Create a Simple Dictionary mydict = {'Name':['Amy', 'Bob', 'Clair', 'Daisy'], 'Birthday':['9/3/1991', '4/21/1988', '4/21/1990', '11/11/1989'], 'Age':[31, 34, 32, 33]} # convert the dictionary to a DataFrame # print the values in the 'Birthday' column # Create a Simple Dictionary mydict = {'Name':['Amy', 'Bob', 'Clair', 'Daisy'], 'Birthday':['9/3/1991', '4/21/1988', '4/21/1990', '11/11/1989'], 'Age':[31, 34, 32, 33]} # convert the dictionary to a DataFrame import pandas as pd mydataframe = pd.DataFrame(mydict) # print the values in the 'Birthday' column mydataframe['Birthday']


Assess It: Check Your Knowledge

Knowledge Check (replace question)