Create A Neural Network That Classifies Diabetes Risk In 15 Lines of Python
Learn about neural network models, and build a neural network in 15 lines of Python with Keras to predict health risks.
Join the community on Discord: https://discordapp.com/invite/QZd3aaN
EDIT 1/13/2019 : Yo guys! I've made a few mistakes in my explanation here, and have the corrections and reasoning behind them at the bottom of the description, please check them out. Thanks as always for your support!
► 1:1 Mentorship: https://goo.gl/P3PgC2
► Subscribe To My New Artificial Intelligence Newsletter! https://goo.gl/qz1xeZ
Dataset: http://archive.ics.uci.edu/ml/machine-learning-databases/pima-indians-diabetes/pima-indians-diabetes.data
About the Dataset: https://archive.ics.uci.edu/ml/datasets/pima+indians+diabetes
Keras Docs: https://keras.io/
Code: https://github.com/jg-fisher/diabetesNeuralNetwork
-- Highly recommended for theoretical and applied ML --
Deep Learning: https://amzn.to/2LomU4y
Hands on Machine Learning: https://amzn.to/2JSxhIv
Your invitation to our new Slack group: https://goo.gl/dbpgZR
Thanks for watching guys, hope you enjoyed. Be sure to leave any comments or questions below, and thumbs up and subscribe if you enjoyed this video!
___________________________________________________________________
IMPORTANT - I did not split the data into train and test segments. This is necessary in order to assess how well your model generalizes. The training set is the data that your models fits, or optimizes its parameters in order to approximate the mapping between the input vectors X and output (distribution of probabilities in this case Y). The test set data that the model has not seen, and is used to evaluate the performance of the model for its use.
In order to do this a function from the sklearn module can be used called train_test_split.
Add the following lines of code:
from sklearn.model_selection import train_test_split
# after X and Y have been read from the csv
x_train, y_train, x_test, y_test = train_test_split(X, Y, test_size=.5, random_state=5)
# change model.fit to the following
model.fit(x_train, y_train, epochs=1000, batch_size=10, validation_data=(x_test, y_test)
IMPORTANT - epochs are composed of batches, which are each subsets of the data distribution. Over the course of 1 epoch, each batch is forward propagated through the network to get the predictions, and backpropagation is applied to update the network parameters (weights and biases) given the loss, or how far off those predictions were from our targets Y.
Видео Create A Neural Network That Classifies Diabetes Risk In 15 Lines of Python канала John G. Fisher
Join the community on Discord: https://discordapp.com/invite/QZd3aaN
EDIT 1/13/2019 : Yo guys! I've made a few mistakes in my explanation here, and have the corrections and reasoning behind them at the bottom of the description, please check them out. Thanks as always for your support!
► 1:1 Mentorship: https://goo.gl/P3PgC2
► Subscribe To My New Artificial Intelligence Newsletter! https://goo.gl/qz1xeZ
Dataset: http://archive.ics.uci.edu/ml/machine-learning-databases/pima-indians-diabetes/pima-indians-diabetes.data
About the Dataset: https://archive.ics.uci.edu/ml/datasets/pima+indians+diabetes
Keras Docs: https://keras.io/
Code: https://github.com/jg-fisher/diabetesNeuralNetwork
-- Highly recommended for theoretical and applied ML --
Deep Learning: https://amzn.to/2LomU4y
Hands on Machine Learning: https://amzn.to/2JSxhIv
Your invitation to our new Slack group: https://goo.gl/dbpgZR
Thanks for watching guys, hope you enjoyed. Be sure to leave any comments or questions below, and thumbs up and subscribe if you enjoyed this video!
___________________________________________________________________
IMPORTANT - I did not split the data into train and test segments. This is necessary in order to assess how well your model generalizes. The training set is the data that your models fits, or optimizes its parameters in order to approximate the mapping between the input vectors X and output (distribution of probabilities in this case Y). The test set data that the model has not seen, and is used to evaluate the performance of the model for its use.
In order to do this a function from the sklearn module can be used called train_test_split.
Add the following lines of code:
from sklearn.model_selection import train_test_split
# after X and Y have been read from the csv
x_train, y_train, x_test, y_test = train_test_split(X, Y, test_size=.5, random_state=5)
# change model.fit to the following
model.fit(x_train, y_train, epochs=1000, batch_size=10, validation_data=(x_test, y_test)
IMPORTANT - epochs are composed of batches, which are each subsets of the data distribution. Over the course of 1 epoch, each batch is forward propagated through the network to get the predictions, and backpropagation is applied to update the network parameters (weights and biases) given the loss, or how far off those predictions were from our targets Y.
Видео Create A Neural Network That Classifies Diabetes Risk In 15 Lines of Python канала John G. Fisher
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Phone Call Forwarding With Python](https://i.ytimg.com/vi/k7ehcpx-Dxs/default.jpg)
![How To Send Mail With Python](https://i.ytimg.com/vi/tsutigPVnaY/default.jpg)
![Serverless Setup & Deploy on AWS](https://i.ytimg.com/vi/pjeT28DWIYk/default.jpg)
![Learn HTML/CSS and Javascript By Building A Startup Website PT. 2](https://i.ytimg.com/vi/zOg1UAe2zD0/default.jpg)
![Create A Discord Bot and Send Email](https://i.ytimg.com/vi/sFqkfJsl1Tg/default.jpg)
![k-means tutorial: machine learning with python from scratch](https://i.ytimg.com/vi/Pe7dL-u7acI/default.jpg)
![Build Production Software Systems (What They Don't Teach You In School)](https://i.ytimg.com/vi/ERYyiSK2RC8/default.jpg)
![What To Know: 2020 Tech](https://i.ytimg.com/vi/Dj6_Z-uUCkE/default.jpg)
![how to create apple.com](https://i.ytimg.com/vi/6qiUhU0nVbI/default.jpg)
![Build A (Full-Featured) Indeed Bot With Python](https://i.ytimg.com/vi/jp0eiGn4jto/default.jpg)
![The Story Of How I Became A Self-Taught Software Engineer](https://i.ytimg.com/vi/OqBFllL5G2w/default.jpg)
![Sneaker Bot | Monitor Sneaker Prices with Python](https://i.ytimg.com/vi/4QQ-8KjghFY/default.jpg)
![Deploy HTML, CSS & JS Website on Azure](https://i.ytimg.com/vi/nTv1rYwDwis/default.jpg)
![javascript machine learning: the perceptron](https://i.ytimg.com/vi/iumlHzoVlJM/default.jpg)
![Create A Supreme Bot: Browser Automation With Python](https://i.ytimg.com/vi/AGpKm0pdTMM/default.jpg)
![How To Create A Twitter Bot With Python](https://i.ytimg.com/vi/MN_1wOxIfRU/default.jpg)
![Create J.A.R.V.I.S With Python | A Voice Activated Desktop Assistant Tutorial](https://i.ytimg.com/vi/2eoudIBVW9w/default.jpg)
![how to create a reddit bot with python](https://i.ytimg.com/vi/wAN8b38U_8c/default.jpg)
![Create a Keylogger with Python](https://i.ytimg.com/vi/2u3nR3JNEzI/default.jpg)
![Build A (Full-Featured) Instagram Bot With Python](https://i.ytimg.com/vi/7qcQDeShXpg/default.jpg)
![Hands-On Infrastructure-As-Code With Terraform and Azure](https://i.ytimg.com/vi/1BB7PubSt_I/default.jpg)