We will walk through an example that involves training a model to tell what kind of wine will be “good” or “bad” based on a training set of wine chemical characteristics.
First, we’re going to import the packages that we’ll be using throughout this notebook. Then we’ll bring in the CSV from my desktop. You can get the raw data from UCI’s ML Database.
We’re also using sci-kit learn. For more information on installing sci-kit to use sklearn packages, visit this website.
#Importing required packages.
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sb
import numpy as np
College is obviously expensive, but is it still a wise investment?
We’ve all heard how expensive college is getting, along with plenty of criticism surrounding its value in a changing job market. Of course, there are many benefits beyond the monetary ones that should be considered when exploring college options, but for the purpose of this post I’m going to limit the scope and purely assess the financial benefit of attending college.
The main financial benefit of attending college is the earnings differential received by a college graduate over a high school graduate; Payscale provides 20-year return on investment (ROI)…
This post will walk through a practice problem which analyzes NBA player’s season stats. We’ve also provided the practice problem’s Colab Notebook so you can follow along, just copy the notebook and the two Google sheets ( season stats and player data) to your Google Drive.
This practice problem has a data set that contains NBA players and their invidiual season stats. This practice will take you through fitting a linear model using player stats to estimate win shares per 48 minutes.
Topics covered in this tutorial:
Using Monte Carlo methods, we’ll write a quick simulation to predict future stock price outcomes for Apple ($AAPL) using Python. You can read more about Monte Carlo simulation (in a finance context) here.
1) Pull the data
First, we can import the libraries, and pull the historical stock data for Apple. For this example, I picked the last ~10 years, although it would be valuable to test sensitivities of different ranges as this alone is subjective.
# Import required librariesimport mathimport matplotlib.pyplot as pltimport numpy as npfrom pandas_datareader import dataapple = data.DataReader('AAPL', 'yahoo',start='1/1/2009')apple.head()#Next…
I’m a product junkie with a passion for data.