Roger kewin project 0

docx

School

Illinois Institute Of Technology *

*We aren’t endorsed by this school

Course

581

Subject

Electrical Engineering

Date

Feb 20, 2024

Type

docx

Pages

9

Uploaded by CorporalFlagChimpanzee43

Report
ECE 563  – ARTIFICIAL INTELLIGENCE IN SMART GRID PROJECT – 0 Name : Roger Kewin Samson Hawk ID : A20563057 Mail ID: rkewin@hawk.iit.edu Spring 2024 Illinois Institute Of Technology Date : January 24, 2024 Report: This project is about to create the AI/ML environment using Anaconda which includes all packages in the same area and jupyterlab, jupyternotebook and spyder with python language. We use numpy, matplotlib,pandas libraries for the below python code. This project includes creating sigmoid and gaussian plots using matplotlib and printing specific columns from zipped csv file of phasor measurement unit file using pandas. STEPS TO CREATE AI/ML ENVIRONMENT: 1. I installed anaconda to create the environment from the link: https://www.anaconda.com/download . 2. Then on the environment option created the new environment as kewinpc
by this I opened the terminal and installed the required libraries for the future use for the given task. “Install scikitlearn matplotlib pandas” . – by installing scikitlearn it also download the numpy as dependencies library so we don’t need to download them separately. 3. Then we can start to use the jupyternotebook for the given task . The screenshot attached for the AI environment in anaconda and downloads of the libraries:
SIGMOIDPLOT FUNCTION: STEPS: 1. Import numpy for the mathematical conditions and matplotlib.pyplot for the plotting in the graph. 2. X is the given value and used linspace (-6,6,100) forms the space in the graph presentation 3. Y= calculation of sigmoid function as ( 1/(1+np.exp(-x)) 4. To make the mark in the curve we use marker as “0” 5. The graph presents the title with sigmoid function and xlabel = xavlues , ylabel = y calculation of sigmoid function. 6. We grid function for the presence of gridlines in the graph. CODE: import numpy as np import matplotlib.pyplot as plt x=np.linspace(-6,6,100)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
y=1/(1+np.exp(-x)) plt.plot(x,y,marker = "o") plt.title (" sigmoid function " ) plt.xlabel ( " x values " ) plt.ylabel (" y calculation of sigmoid ") plt.grid (True) plt.show()
GAUSSIAN PROBABILITY DENSITY FUNCTION: Steps: 1. As the last code import numpy here to for the mathematical calculations and matplotlib for the graph and plot the point present in the curve. 2. Use np.linspace for the space with the range of (-5,5,100) 3. To form the two Gaussian probability density function takes as y1 and y2 with different standard deviations (SD=2 for y1 and SD=1 for y2). 4. plt.plot(x, y1, marker='x', label='SD=2'): Plots y1 against x with 'x' markers and labels it as 'SD=2'. 5. plt.plot(x, y2, marker='o', label='SD=1'): Plots y2 against x with 'o' markers and labels it as 'SD=1'. 6. We use legend to differentiate the curves between both of them. CODE: import numpy as np import matplotlib.pyplot as plt x = np.linspace(-5,5,100) y1 = (1/(2*np.pi*2))*np.exp(-(x-1)**2/(2*2**2)) y2 = (1/(2*np.pi*1))*np.exp(-(x+1)**2/(2*1**2)) plt.plot(x,y1,marker='x',label='SD=2') plt.plot(x,y2,marker='o',label='SD=1') plt.title('Gaussian Probability Density Functions') plt.xlabel('x') plt.ylabel('Probability Density') plt.legend() plt.grid(True) plt.show()
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Python code that uses pandas to select and print the given <199000 zipped CSV file of PMU data, CODE: import pandas as pd df = pd.read_csv(r"C:\Users\hp\Downloads\PMU01_140701\PMU01_140701.csv") subset_df = df[df['VCLPM:Magnitude'] < 199000][['Timestamp', 'VALPM:Magnitude', 'VBLPM:Magnitude', 'VCLPM:Magnitude']] print(subset_df)
RESULT: Timestamp VALPM:Magnitude VBLPM:Magnitude \ 11315 2014/07/01 02:42:08.966 206117.2188 197712.6875 11476 2014/07/01 02:42:14.333 205979.9063 197424.2969 11477 2014/07/01 02:42:14.366 206323.2344 199758.8906 48926 2014/07/01 03:03:05.133 205595.3906 206446.8281 48927 2014/07/01 03:03:05.166 204551.6875 206062.2969 56064 2014/07/01 03:07:03.600 190640.2500 204277.0313 56065 2014/07/01 03:07:03.633 168283.0625 199415.5781 56066 2014/07/01 03:07:03.666 185916.1250 199470.5000 VCLPM:Magnitude 11315 198948.6563 11476 198701.4688 11477 198509.2031 48926 198797.5938 48927 198179.6094 56064 198440.5313 56065 195103.4375 56066 196888.7188 1. In this we use r as prefix of the path of the file to avoid error it is a raw string. 2. Import pandas library for the data manipulation and analysis. 3. For the data frame we insert the path of the file “ C:\Users\hp\Downloads\ PMU01_140701\PMU01_140701.csv". CONCLUSION:
The project is about creating an environment for AI/ML for future project use by downloading the libraries. The project 0 contains of three tasks they are sigmoid plot function, gaussian probability density function and printing the data by analysing the csv file with PMU data. By these it used for data analysis using python. These are the basic things for making an environment for AI/ML.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help