Cocalc Optional Labs
Welcome to the first optional lab! Optional labs are available to: provide information - like this notebook reinforce lecture material with hands-on examples provide working examples of routines used in the graded labs Get a brief introduction to Jupyter notebooks
CoCalc: Collaborative Calculations and Data Science In this lab, you will contrast regression and classification. Examples of classification problems are things like: identifying email as Spam or Not Spam or determining if a tumor is malignant or benign. In particular, these are examples of binary classification where there are two possible outcomes. Outcomes can be described in pairs of 'positive'/'negative' such as 'yes'/'no, 'true'/'false' or '1'/'0'. Plots of classification data sets often use symbols to indicate the outcome of an example.
In the plots below, 'X' is used to represent the positive values while 'O' represents negative outcomes. In the single variable plot, positive results are shown both a red 'X's and as y=1. Negative results are blue 'O's and are located at y=0. Recall in the case of linear regression, y would not have been limited to two values but could have been any value. There is an open-source, commercially usable machine learning toolkit called scikit-learn. This toolkit contains implementations of many of the algorithms that you will work with in this course.
Utilize scikit-learn to implement linear regression using a close form solution based on the normal equation You will utilize functions from scikit-learn as well as matplotlib and NumPy. Scikit-learn has the linear regression model which implements a closed-form linear regression. Let's use the data from the early labs - a house with 1000 square feet sold for $300,000 and a house with 2000 square feet sold for $500,000. you will implement and explore the cost function for linear regression with one variable. NumPy, a popular library for scientific computing
Matplotlib, a popular library for plotting data local plotting routines in the lab_utils_uni.py file in the local directory You would like a model which can predict housing prices given the size of the house. Let's use the same two data points as before the previous lab- a house with 1000 square feet sold for $300,000 and a house with 2000 square feet sold for $500,000. In this lab we will explore the inner workings of neurons/units and layers. In particular, the lab will draw parallels to the models you have mastered in Course 1, the regression/linear model and the logistic model.
The lab will introduce Tensorflow and demonstrate how these models are implemented in that framework. Tensorflow and Keras Tensorflow is a machine learning package developed by Google. In 2019, Google integrated Keras into Tensorflow and released Tensorflow 2.0. Keras is a framework developed independently by François Chollet that creates a simple, layer-centric interface to Tensorflow. This course will be using the Keras interface. We'll use an example from Course 1, linear regression on house prices.
The function implemented by a neuron with no activation is the same as in Course 1, linear regression: fw,b(x(i))=w⋅x(i)+b(1) f_{\mathbf{w},b}(x^{(i)}) = \mathbf{w}\cdot x^{(i)} + b \tag{1}fw,b(x(i))=w⋅x(i)+b(1) We can define a layer with one neuron or unit and compare it to the familiar linear regression function. Welcome to the first optional lab! Optional labs are available to: provide information - like this notebook reinforce lecture material with hands-on examples
provide working examples of routines used in the graded labs Get a brief introduction to Jupyter notebooks
People Also Search
- CoCalc -- Optional Labs
- CoCalc -- C1_W1_Lab01_Python_Jupyter_Soln.ipynb
- Collaborative Calculations - CoCalc
- CoCalc -- C1_W3_Lab01_Classification_Soln.ipynb
- CoCalc -- C1_W2_Lab06_Sklearn_Normal_Soln.ipynb
- CoCalc -- C1_W1_Lab04_Cost_function_Soln.ipynb
- CoCalc -- C1_W1_Lab05_Gradient_Descent_Soln.ipynb
- CoCalc -- C2_W1_Lab01_Neurons_and_Layers.ipynb
- CoCalc -- C1_W1_Lab01.ipynb
Welcome To The First Optional Lab! Optional Labs Are Available
Welcome to the first optional lab! Optional labs are available to: provide information - like this notebook reinforce lecture material with hands-on examples provide working examples of routines used in the graded labs Get a brief introduction to Jupyter notebooks
CoCalc: Collaborative Calculations And Data Science In This Lab, You
CoCalc: Collaborative Calculations and Data Science In this lab, you will contrast regression and classification. Examples of classification problems are things like: identifying email as Spam or Not Spam or determining if a tumor is malignant or benign. In particular, these are examples of binary classification where there are two possible outcomes. Outcomes can be described in pairs of 'positive...
In The Plots Below, 'X' Is Used To Represent The
In the plots below, 'X' is used to represent the positive values while 'O' represents negative outcomes. In the single variable plot, positive results are shown both a red 'X's and as y=1. Negative results are blue 'O's and are located at y=0. Recall in the case of linear regression, y would not have been limited to two values but could have been any value. There is an open-source, commercially us...
Utilize Scikit-learn To Implement Linear Regression Using A Close Form
Utilize scikit-learn to implement linear regression using a close form solution based on the normal equation You will utilize functions from scikit-learn as well as matplotlib and NumPy. Scikit-learn has the linear regression model which implements a closed-form linear regression. Let's use the data from the early labs - a house with 1000 square feet sold for $300,000 and a house with 2000 square ...
Matplotlib, A Popular Library For Plotting Data Local Plotting Routines
Matplotlib, a popular library for plotting data local plotting routines in the lab_utils_uni.py file in the local directory You would like a model which can predict housing prices given the size of the house. Let's use the same two data points as before the previous lab- a house with 1000 square feet sold for $300,000 and a house with 2000 square feet sold for $500,000. In this lab we will explore...