Building a Machine Learning (Artificial Neural Network) Model – Python Data Science Intro Project




[ad_1]

We get pretty involved in this one – let me know if you like this style of full builds okay or prefer the quick five minute pieces!

In this one we’ll look at how we can create a machine learning model, an artificial neural network, ANN, to do classification predictions on a data set.

We’ll be using pandas and numpy for processing the data, tensorflow to build our model, and matplotlib to visualize data.

Machine Learning —
Machine Learning sounds scary, but in reality it’s just allowing our computer to try to find patterns in data without really giving it instructions on how to do it. We “teach” these patterns by giving a model training data and training labels (the outputs we expect.) By knowing the “answers” and the features, a model can reverse engineer the patterns. We can then use this trained model to predict data the model hasn’t seen.

Artificial Neural Network —
Artificial Neural Network, ANN, is a type of machine learning that uses nodes and tries to resemble the human brain. We teach these models by constructing nodes together into layers. We then construct multiple layers together into a model.

A node receives a summation of inputs from all previous nodes firing to it. If the input is high enough, this will trigger the node to “fire” itself. What the node “fires” is a product of the summation of the input and the activation function. If the threshold is not met, the node may not fire.

The first layer is the input layer, the last layer is the output layer, and all the layers in between are “hidden” layers. They are called hidden because we are unable to see both their inputs and outputs. It is a mystery as to what is happening in these layers. “Deep Learning” is a term used to coin these hidden layer interactions. The more hidden layers, the higher the level of complexities our model can learn. More layers doesn’t always necessarily mean better results, as we can “overfit” data.

over fitting —
Over fitting is where we train our model and the model thinks it has “learned” patterns that are always true but really aren’t. The patterns just exist in the training data but aren’t representative of the entire population. We can check overfitting by using validation data in our machine learning.

Data Science —
A little more complex than what I could put here, but data science is mainly focused on how we can interpret data into the future. Building models from previous data to explore and predict future events, classifications, etc.

Thanks so much for watching the video! It’s incredible how far the channel has come. My style in the beginning videos was to be as quick and straight to the point as possible. My mentality was lower video times, more people are likely to click. Thanks to everyone supporting me along the way, I feel like I can put a little more personality into videos without the worry of it only ever being viewed by me. 5867 subscribers at the time of writing, how dope. If you’ve watched any of my videos, subscribed to the channel, or supported me in any other way, thank you so much. You’re incredible.

Join The Socials — Picking Shoutouts Across YouTube, Insta, FB, and Twitter!
FB – https://www.facebook.com/CodeWithDerrick/
Insta – https://www.instagram.com/codewithderrick/
Twitter – https://twitter.com/codewithderrick
LinkedIn – https://www.linkedin.com/in/derricksherrill/
GitHub – https://github.com/Derrick-Sherrill
*****************************************************************
Full code from the video:

https://github.com/Derrick-Sherrill/tf-2-examples/tree/master/classifications/Mushrooms

Packages (& Versions) used in this video:
Python 3.7
TensorFlow 2.0
NumPy 1.17
Pandas
Matplotlib
sklearn
Atom Text Editor
*****************************************************************
Code from this tutorial and all my others can be found on my GitHub:
https://github.com/Derrick-Sherrill/DerrickSherrill.com

Check out my website:
https://www.derricksherrill.com/

If you liked the video – please hit the like button. It means more than you know. Thanks for watching and thank you for all your support!!

— Channel FAQ —

What text editor do you use?
Atom – https://atom.io/

What Equipment do you use to film videos?
Blue Yeti Microphone – https://amzn.to/2PcNj5d
Mic sound shield – https://amzn.to/3bVNkEt
Soundfoam – https://amzn.to/37NV9ci
Camera desk stand – https://amzn.to/3bX8xhm
Box Lights – https://amzn.to/2PanL95
Side Lights – https://amzn.to/37KSNut
Green Screen – https://amzn.to/37SFFnc

What computer do you use/desk setup?
Film on imac (4k screen) – https://amzn.to/37SEu7g
Work on Macbook Pro – https://amzn.to/2HJ5b3G
Video Storage – https://amzn.to/2Pey8sw
Mouse – https://amzn.to/2PhCtv3
Desk – https://amzn.to/37O1Mv1
Chair – https://amzn.to/2uqHE4E

What editing software do you use?
Adobe CC – https://www.adobe.com/creativecloud.html
Premiere Pro for video editing
Photoshop for images
After Effects for animations

Source


[ad_2]

Comment List

  • Derrick Sherrill
    December 12, 2020

    Awesome. But your armpit hair… Dude… πŸ˜‰

  • Derrick Sherrill
    December 12, 2020

    Derrick smile looks very friendly.

  • Derrick Sherrill
    December 12, 2020

    Thank you so much for this video! I am a rookie learner in ML programs. I find this video really helpful and amazing!! Could you also make more videos on different types of algorithms, especially for regression problems, and how to implement them in python.

  • Derrick Sherrill
    December 12, 2020

    Genial!

    Thank you!πŸ‘πŸ‘πŸ‘

  • Derrick Sherrill
    December 12, 2020

    Excellent way of explaining, you make it look so simple.

  • Derrick Sherrill
    December 12, 2020

    finally found, thank you somuch !!!

  • Derrick Sherrill
    December 12, 2020

    Nice tutorial. Curious, what % of your current Python knowledge is from self-learning versus from formal classes?

  • Derrick Sherrill
    December 12, 2020

    Tensorflow doesn't get installed…

  • Derrick Sherrill
    December 12, 2020

    Thank you Big, Derrick

  • Derrick Sherrill
    December 12, 2020

    For the output layer could you build it like this: Keras.layers.Dense(1, activation="sigmoid")?

  • Derrick Sherrill
    December 12, 2020

    hey hi! Tensorflow has a way of using one-hot encoding with your categorical variables. Why did you choose to use it with pandas? Great video it was so helpful.

  • Derrick Sherrill
    December 12, 2020

    You make it so simple. Keep bringing and growing β€οΈπŸ’•πŸŽ‰πŸ‘

  • Derrick Sherrill
    December 12, 2020

    Thanks Derrick. These tutorials are excellent πŸ‘

  • Derrick Sherrill
    December 12, 2020

    He looks like gay Martin Garrix

  • Derrick Sherrill
    December 12, 2020

    Hi, can i ask you how should i go about labeling unique numbers to an image for example, if i was working with faces, how should i tell the model that a specific face is 30 years old?

  • Derrick Sherrill
    December 12, 2020

    You're the best bro , big salute from Tunisia ☺️

  • Derrick Sherrill
    December 12, 2020

    Great tutorial man!! Killed it ,…. thank you so much πŸ’ͺ🏻πŸ’ͺ🏻πŸ’ͺ🏻

  • Derrick Sherrill
    December 12, 2020

    Cause I missed the data download step

  • Derrick Sherrill
    December 12, 2020

    I am stuck at : FileNotFoundError: [Errno 2] No such file or directory: 'mushroom.csv'

  • Derrick Sherrill
    December 12, 2020

    What packages do you recommend for Atom editor when programming in Python? Thanks for your tutorials.

  • Derrick Sherrill
    December 12, 2020

    Hi Derrick, this tutor on training of data in artificial neural network. I am highly appreciated how to create or supply array Raster input datasets say using nested for loop method to train and implement forward/backward propagation in ANN. In this case, for instance, 4 raster input datasets (R1, R2, R3 and R4) of which 2 datasets (R1 and R2) having time, longitude and latitude dimensions, and 2 of them (R3 and R4) have no time dimension can be used. The shape of the Raster data is (time =1000, latitude =310, longitude =458) and how to initialize weight and bias. Thank you in advance for your time and knowledge sharing.

  • Derrick Sherrill
    December 12, 2020

    When you said that we are going to create an operating system in 1 video I was like "what?" and moved my mouse over progression bar quickly to check how long is this video.

  • Derrick Sherrill
    December 12, 2020

    THIS IS EXACTLY WHAT I NEED, THANK YOU I HOPE YOU CONTINUE IN ML.

  • Derrick Sherrill
    December 12, 2020

    I loved this tutorial so much !!! You're great at explaining ! I wish you all the best and please keep making tutorials !!

  • Derrick Sherrill
    December 12, 2020

    Hey dude ! Your video was amazing and explanatory.

    I'm having a problem though, I am trying to make a similar neural network using keras and whenever I try to fit the model I get a big ass error in jupyter notebook and at the end of it,it is written " module 'scipy.sparse' has no attribute 'issparse'
    Please help !!

  • Derrick Sherrill
    December 12, 2020

    Thanks. Why am I getting the error message NameError: name 'mushroom_df' is not defined despite downloading the csv file to download and following the instructions from first to third line.
    Please assist. Thanks

  • Derrick Sherrill
    December 12, 2020

    Very crisp and clear explanation, loved the tutorial

  • Derrick Sherrill
    December 12, 2020

    Please lets try and make a ML on predicting a stock price or spy or dow jones. That would really create a good content and benchmark what ML is really usefull or helpfull. Thanks

  • Derrick Sherrill
    December 12, 2020

    Awesome intro, thanks very much. But with this model, how do we know which features help us determine if a mushroom is poisonous or edible?

  • Derrick Sherrill
    December 12, 2020

    Hello Derrick
    This is a really good tutorial thank you.
    Do you have a similar tutorial that covers GitHub (from initial set up to how to use it.)

  • Derrick Sherrill
    December 12, 2020

    Great job dude!

  • Derrick Sherrill
    December 12, 2020

    Thank you for videos. You provide simple, easy to understand explanations of the code, but don’t go too deep β€œunder the hood”. I always look forward to watching your videos.

  • Derrick Sherrill
    December 12, 2020

    Yes this may be true from ur side in future too and you will say "today we will built a complete OS in this video"
    You are amazing…πŸ™πŸ™πŸ™

  • Derrick Sherrill
    December 12, 2020

    Dopelicious ! Derrick, this style of full builds is absolutely fine. Looking forward to your new videos on Data Science, Machine Learning and Neural Networks.

    P.S. You channel is the best channel, dedicated to Python in English language so far. Keep it up !

  • Derrick Sherrill
    December 12, 2020

    have you tried googles colab?
    thanks that was a good video. got to the end with no issues.
    one thing about google colab is the csv file has to be in the folder on the left side of the screen

  • Derrick Sherrill
    December 12, 2020

    Great content man, keep it coming. πŸ™‚

  • Derrick Sherrill
    December 12, 2020

    Excellent, your amazing πŸ™‚ GOOD WORK

Write a comment