Skip to content

Commit

Permalink
Finishing readme and removing solutions file
Browse files Browse the repository at this point in the history
  • Loading branch information
juanis2112 committed Feb 23, 2020
1 parent 9198bb7 commit da41995
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 127 deletions.
2 changes: 1 addition & 1 deletion .spyproject/config/backups/workspace.ini.bak
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ save_non_project_files = False

[main]
version = 0.2.0
recent_files = ['utils.py', 'workshop_solutions.py']
recent_files = ['utils.py', 'workshop.py', 'workshop_solutions.py']

2 changes: 1 addition & 1 deletion .spyproject/config/workspace.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ save_non_project_files = False

[main]
version = 0.2.0
recent_files = ['utils.py', 'workshop.py', 'workshop_solutions.py']
recent_files = []

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# Spyder-Workshop
Spyder Workshop
The main goal of this workshop is to explorer some of Spyder's main functionalities for scientific programming. During this workshop we will work on data visualisation, analysis and prediction using Python libraries like Pandas, Matplotlib and Scikit-learn over a data set containing information about the weather history from 2006 to 2016.

## Project Set-Up
0. Clone https://github.com/juanis2112/Spyder-Workshop repository and in Spyder open this folder as a project under the 'Project' menu in the top toolbar. Then, open the file 'workshop.py' using the outline pane.

## Importing Libraries and Data
The first thing we need to do before starting our work, is importing the libraries necessary for our analysis and saving the data in a way that is easy to explore.
Expand Down Expand Up @@ -98,13 +101,11 @@ Note that this means our model is a linear function `$$y = beta_0 + beta_1 \time
`plt.ylabel('Temperature (C)')`
`plt.legend()`
`plt.show()`

31. Using the coefficients found in our model, predict the temperature for a given level of humidity using the `predicted_temperature` function available in 'utils'.

Finally, we can numerically evaluate how good was our model predicted. For this we will use the `explained_variance_score`metric available in sklearn.metrics. This metric is calculated as 1-(Var(Y_real-Y_model)/Var(Y_real)) which means that the closer the value is to 1, the better our model.

32. Use the following command `from sklearn.metrics import explained_variance_score`to import the function that evaluates how good is our model.

33. Calculate the explained variance score and print it using the following `ev = explained_variance_score(Y_test, Y_predict)`
`print(ev)`.

Expand Down
Binary file removed data/weatherHistory.zip
Binary file not shown.
122 changes: 0 additions & 122 deletions workshop_solutions.py

This file was deleted.

0 comments on commit da41995

Please sign in to comment.