Please see here for an intuitive explanation from 3Blue1Brown for Neural Networks. Artificial Intelligence largely revolves around implementing machine learning on very large neural networks with many layers. These neural networks might be considered to mathematically mimic the way the human brain works e.g. absorbing wide-ranging stimuli, and then parsing it through banks (layers) of neurons that learn to associate the input with output experientially.
TensorFlow is a free and open-source software library for machine learning and artificial intelligence. It can be deployed for tasks where there is a particular focus on training and inference of deep neural networks. TensorFlow was developed by the Google Brain team for internal Google use in research and production. TensorFlow could be used to train a neural network to classify images of clothing or build and train a retrieval model to predict a set of movies that a user is likely to watch. A useful playlist which introduces TensorFlow using Google Colab can be found here. A series of tutorials can be found here. Also, see here for option pricing example from Culkin and Das (2017) with a TensorFlow backend, alternatively here. Background for computing the the Black Scholes model can be found here. An R implementation of NN for Black Scholes valuation can be found here.
Setting up a regression estimation with TensorFlow can be distilled into a few key steps:
Import Libraries: Start with TensorFlow and any necessary data handling libraries.
Prepare Your Dataset: Load and preprocess your data, including normalization, handling missing values, and splitting into training and testing sets.
Define Your Model: Create your model architecture using TensorFlow's Keras API, typically a sequential model with layers suited for regression.
Compile Your Model: Specify the optimizer, loss function (often mean squared error for regression), and evaluation metrics.
Train Your Model: Fit your model on the training data, deciding on the number of epochs and batch size.
Evaluate and Adjust: Assess model performance on the test set and adjust your model or data processing as needed.
Make Predictions: Use your trained model to make predictions on new data
In the videos below we make reference to Keras. This library provides a Python interface for artificial neural networks. Keras acts as an interface for the TensorFlow library.
The MPG (miles per gallon) auto dataset is a widely used dataset for analyzing and modeling vehicle fuel efficiency based on various attributes of cars. Here's a breakdown of each attribute within the dataset:
MPG (Miles Per Gallon): This is a measure of how far a car can travel on a gallon of fuel. It's a key indicator of fuel efficiency, with higher values indicating better fuel economy.
Cylinders: This attribute refers to the number of cylinders in the vehicle's engine. Engines can have varying numbers of cylinders (commonly 4, 6, or 8), which can affect performance and fuel efficiency. Typically, more cylinders provide more power but can lead to lower fuel efficiency.
Displacement: This measures the total volume of all the cylinders in the engine, expressed in cubic centimeters (cc) or liters. It's an indicator of the engine size. Larger engines typically offer more power but may be less fuel-efficient.
Horsepower: This is a measure of the engine's power output. Horsepower is a unit of measurement that quantifies the engine's ability to do work over time. Higher horsepower means the car can accelerate faster and perform better but might consume more fuel.
Weight: This attribute refers to the vehicle's weight without passengers or cargo, also known as curb weight. It's measured in pounds or kilograms. Generally, heavier vehicles have lower fuel efficiency because more energy is required to move them.
Acceleration: This measures the time it takes for a vehicle to accelerate from a standstill to a certain speed (commonly 0 to 60 mph). It's usually measured in seconds. While not directly related to fuel efficiency, acceleration can give insights into the vehicle's performance and how its engine power is used.
Model Year: This indicates the year the vehicle was manufactured. Over the years, advancements in technology and changes in regulations have generally led to improvements in fuel efficiency and emissions.
Origin: This attribute specifies the region or country where the car was manufactured. It can sometimes be used as a proxy for certain design philosophies or engineering practices that might influence fuel efficiency and performance characteristics.
Each of these attributes contributes to the overall understanding of a vehicle's performance, fuel efficiency, and environmental impact. The MPG dataset is often used for regression analysis, where these features can help predict outcomes like fuel efficiency or identify trends in automotive technology and design.
Please see tensorflow coding playlist here.
Wisconsin Breast Cancer Dataset. Please see classification github here related to Laurence's video below.
Please see here Towards Data Science article. House Prices Prediction Using Deep Learning . Keras-Regression vs Multiple Linear Regression. Find python notebook github on same page.
Please also see here.
Michael Allen's github can be found here. See here also for linear estimator example from TensorFlow website.