Make Your First AI in 15 Minutes with Python

Поділитися
Вставка
  • Опубліковано 4 січ 2025

КОМЕНТАРІ •

  • @matthewgriffith2078
    @matthewgriffith2078 3 роки тому +1255

    This was an amazing example of clear and concise education. You are nailing these tutorials better than some 60 year old professors. And with push-ups.🤯

    • @kinspower
      @kinspower 3 роки тому +11

      Literally the first module given by coursera, sure it's nice to have something to put on 2x speed but it's not what I was looking to learn

    • @davidicke4451
      @davidicke4451 3 роки тому

      Quantum computing could threaten humanity as we know it…
      ua-cam.com/video/ip3FwAYWjkw/v-deo.html

    • @ElmoSeesYou
      @ElmoSeesYou 2 роки тому +6

      In this Video you learn NOTHING about AI and you dont even do anything in general why im giving it a thumb down.

    • @nan6849
      @nan6849 2 роки тому +6

      @@ElmoSeesYou so you're saying that Tensorflow he's using with neural network prediction isn't AI at all?

    • @ElmoSeesYou
      @ElmoSeesYou 2 роки тому +11

      @@nan6849 I don't know what happens in the module, but I believe it actually is AI. But what I'm saying is, that you just don't get to know anything abiut AI. What even is a neural network? No clue because this video is explaining nothing

  • @sennetor
    @sennetor 2 роки тому +317

    If you get an error at the end that is something like "ValueError: Input 0 of layer "sequential_1" is incompatible with the layer: expected shape=(None, 455, 30), found shape=(None, 30)" then replace the 1st line the segment "model.add" instead of "model.add(tf.keras.layers.Dense(256, input_shape=x_train.shape, activation='sigmoid'))" use "model.add(tf.keras.layers.Dense(256, input_shape=x_train.shape[1:], activation='sigmoid'))". Most importantly recompile all segments both from start to finish after making this change.

    • @indiecowan33
      @indiecowan33 2 роки тому +5

      omg recompiling i did not do that thank you!

    • @thehulk6866
      @thehulk6866 2 роки тому +1

      Thanks man, it worked!!

    • @sennetor
      @sennetor 2 роки тому +2

      @@thehulk6866 your welcome 😀

    • @DelbertTy
      @DelbertTy 2 роки тому +5

      Thanks for sharing! Can you explain why the error was happening in the first place? Is it because the x_train shape is still including the first column and hence this solution is just slicing the data set from to start from 1 instead of 0?

    • @OnesiderTT
      @OnesiderTT 2 роки тому

      Hey gem! THANKS FOR SHARING 💎❤️

  • @redbeardhomes
    @redbeardhomes Рік тому +125

    Great video. As someone who as taken a full AI course in College I can say that they should really use your example as lecture 1. Show the students what they can do, and then teach them each of the components that they simply used from the tf library.

    • @Inconvenientx
      @Inconvenientx 9 місяців тому +2

      As a college professor for years, a good approach (depending on the starting points of the class) would be to give the students this video and a few other bits of material before class, get them building themselves, and then help with errors and confusion during class time.

    • @kidzvidz3262
      @kidzvidz3262 8 місяців тому

      ​@@InconvenientxWhat would you say those other bits of material are?

    • @johnschempp2342
      @johnschempp2342 8 місяців тому

      College Protest Preparing

  • @captaintroll7294
    @captaintroll7294 7 місяців тому +379

    Yo i think OpenAI copied your tutorial

    • @Pawfessor1
      @Pawfessor1 7 місяців тому +7

      no

    • @theadameubanks
      @theadameubanks  7 місяців тому +70

      fr?

    • @CoolDude-mq8dh
      @CoolDude-mq8dh 7 місяців тому +25

      @@theadameubanksno dawg its a joke

    • @radicalspark5146
      @radicalspark5146 6 місяців тому +38

      ​​@@CoolDude-mq8dh he knows its a joke he just played along with it

    • @ColdPotato
      @ColdPotato 6 місяців тому +4

      This video may become part of their training dataset, so eventually maybe yes.

  • @benjaminw2194
    @benjaminw2194 3 роки тому +158

    Thanks! I liked the part where you opened the internet tab to show the parts of the neutrale net in reference to the code. When I see code I usually get flustered but that illustration helped make sense of the code. Please keep making more videos! 😀

    • @nik7069
      @nik7069 3 роки тому +1

      If you got it to work could you tell me how? I couldnt get past the "model.fit(x_train, y_train, epochs=100)" Line. If you did it, please let me know how!

    • @didyouknow19256
      @didyouknow19256 2 роки тому +3

      @@nik7069 read @Saad Humayun comment, it saved me

    • @mohitsingh8857
      @mohitsingh8857 Рік тому +1

      @@didyouknow19256 ab iska comment kaha khojne jaun 🙄

    • @mohd.asaads.279
      @mohd.asaads.279 Рік тому

      ​​@@didyouknow19256 where is it
      It's not visible
      Could u pls tell me about it

  • @snoopi6243
    @snoopi6243 3 роки тому +496

    Perfect video! BTW for those experiencing an error at the end with the input_shape giving ValueError: Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 455, 30), found shape=(None, 30),
    Just use this instead of the first line:
    model.add(tf.keras.layers.Dense(256, input_shape=x_train.shape[1:], activation = 'sigmoid'))
    Remember to run all code blocks from top to bottom again, to make sure it works perfectly fine! Do not try to just run this separate code block otherwise it will never work.

    • @dps253
      @dps253 3 роки тому +16

      Thank you! I was stuck at the same spot.

    • @國勳徐
      @國勳徐 2 роки тому +8

      What are differences between them?

    • @snoopi6243
      @snoopi6243 2 роки тому +15

      @@國勳徐 no difference, its just a colab bug nowadays that most machines cant handle for some reason. the second line basically removes all bugs and when u run it all in a row it makes sure that the last line is executed properly

    • @Embuer
      @Embuer 2 роки тому +10

      TYSM this is the comment I was searching for

    • @FoehnG
      @FoehnG 2 роки тому +5

      You rock. I've been scouring the internet for this and it was right there x)

  • @ryanmichael3125
    @ryanmichael3125 2 роки тому +83

    Thank you for this awesome video Kahnrad. This is wonderfully explained.
    UPDATE: model.fit() will throw an error unless line 24:
    model.add(tf…Dense(256, input_shape=x_train.shape, …)
    is changed to: x_train.shape[1:]
    Then recompile top down, should be solid

  • @mahiaravaarava
    @mahiaravaarava 3 місяці тому

    Make Your First AI in 15 Minutes with Python: Follow this quick and easy guide to create a simple AI application using Python. Perfect for beginners, this tutorial will help you understand the basics of AI development and get hands-on experience in just a quarter-hour.

  • @djjj614
    @djjj614 3 роки тому +62

    For people getting the ERROR at the end use this line instead
    model.add(tf.keras.layers.Dense(256, input_shape=x_train.shape[1:], activation='sigmoid'))
    on the first line when adding models

    • @pratikbehera4770
      @pratikbehera4770 3 роки тому +2

      i m still getting that error. can you help??

    • @fufusytb
      @fufusytb 2 роки тому +1

      @@pratikbehera4770 did u know how to fix it? I’m also still getting it

    • @pratikbehera4770
      @pratikbehera4770 2 роки тому +1

      @@fufusytb nah...tried some of the more comments still getting the same error

    • @Jack-wi1st
      @Jack-wi1st 2 роки тому

      @@fufusytb i put this code on the last line and it worked, but the data doesn’t configure with the gpu for the testing of the AI machine we just created

    • @jackReme
      @jackReme 2 роки тому +7

      For me it worked with:
      model.add(tf.keras.layers.Dense(256, input_shape=(x_train.shape[1],), activation='sigmoid'))

  • @jemrules835
    @jemrules835 2 роки тому +1

    Watch this video if you want to run your model on a set of data: ua-cam.com/video/A4K6D_gx2Iw/v-deo.html

  • @wkennedypsyd1
    @wkennedypsyd1 3 роки тому +152

    This was great! I am a clinical psychology and am I'm helping with retention in the treatment program for at risk youth. Babe I've been looking for a way to do to do machine learning to predict which kids are at highest risk in order to throw more resources behind them. I think I've found it! Thank you! If this works the way that I hope it will then you will be impart responsible for adding to do the safety and securityOf hundreds of youth.

    • @ayouboularbi9681
      @ayouboularbi9681 3 роки тому +2

      good luck !

    • @julietkariuki332
      @julietkariuki332 2 роки тому +7

      Well? How'd it go? You've got to tell us 😅😂☺️

    • @nategoodwin3329
      @nategoodwin3329 2 роки тому +2

      I would love to hear an update on this.

    • @YungSwayZeey
      @YungSwayZeey 2 роки тому

      pretty crazy nail the kids just going into high school with AI predicted system.
      I'm curious about this and maybe diagnosing cars and certain model issues. Or even install a system that helps tell what's causing issues.

  • @kamdenmay3340
    @kamdenmay3340 3 роки тому +167

    Can you please upload more for AI tutorials? Great video btw

  • @aishwaryasubramaniyan7083
    @aishwaryasubramaniyan7083 Рік тому +7

    I am getting the below error
    Epoch 1/1000
    ---------------------------------------------------------------------------
    ValueError Traceback (most recent call last)
    in
    ----> 1 model.fit(x_train, y_train, epochs=1000)

  • @gokkertje1682
    @gokkertje1682 2 місяці тому +2

    btw if u get an error on the fit, replace the 3 layers (3 adds) with this:
    model = tf.keras.models.Sequential()
    model.add(tf.keras.layers.Dense(256, input_shape=(30,), activation="sigmoid"))
    model.add(tf.keras.layers.Dense(256, activation="sigmoid"))
    model.add(tf.keras.layers.Dense(1, activation="sigmoid"))

    • @kythe1655
      @kythe1655 28 днів тому

      Thanks it works now

  • @_askew
    @_askew Рік тому +3

    Thanks for such a comprehensive and informative guide! I’m trying to make an AI that manages data from plants in my garden, and this has been such a great help.

  • @dobryponczek9234
    @dobryponczek9234 Рік тому +2

    if someone have error :
    ValueError: Input 0 of layer "sequential_1" is incompatible with the layer: expected shape=(None, 455, 30), found shape=(None, 30)
    Then clear whole block 6 and paste :
    model.add(tf.keras.Input(shape=(x_train.shape[1],)))
    model.add(tf.keras.layers.Dense(128, activation='sigmoid'))
    model.add(tf.keras.layers.Dense(256, activation='sigmoid'))
    model.add(tf.keras.layers.Dense(1, activation='sigmoid'))

  • @iangraham6730
    @iangraham6730 Рік тому +9

    Here is the fix for the problem you are all having with the 'model.add' line . . add this to the block above it
    import tensorflow as tf
    model = tf.keras.models.Sequential(tf.keras.layers.Dense(1))

  • @thegoldenchopper3355
    @thegoldenchopper3355 9 місяців тому +1

    You are AWESOME! You are a prodigy at coding. Please continue what you do!

  • @BhargavaK108
    @BhargavaK108 6 місяців тому +6

    SOLUTION TO VALUE ERROR:
    Just follow the vid and then in the section between model = tf.keras.models.Sequential() and model.compile, replace the code with:
    model.add(tf.keras.layers.Dense(256, input_shape=x_train.shape[1:], activation='sigmoid'))
    model.add(tf.keras.layers.Dense(1, activation='sigmoid'))
    in place of the previous model.add section code and then just train from the beginning.
    solution courtesy of outplayed_1283

    • @KsaweryObizhisvit
      @KsaweryObizhisvit 6 місяців тому

      I got the same error
      It helped to replace that section with:
      model.add(tf.keras.layers.Dense(256, activation='sigmoid'))
      model.add(tf.keras.layers.Dense(1, activation='sigmoid'))

  • @mleal8000
    @mleal8000 2 роки тому +2

    Not sure how or why I came across this video, but muhfkr you know what you're doing on a comp!!! Good job!!!

  • @caluar100
    @caluar100 Рік тому +5

    Hey! great video! I do keep getting an error even on your colab notebook in the line
    "model.fit(x_train, y_train, epochs=1000)"
    I get:
    "ValueError Traceback (most recent call last)"
    " ValueError: Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 455, 30), found shape=(None, 30)"
    Any thoughts on what might be happening?

  • @dedaeye
    @dedaeye 2 роки тому +1

    it maybe a stupid question but how do I then input values for the AI to look at?

  • @IshaanAgarwal-xv6zc
    @IshaanAgarwal-xv6zc 2 роки тому +63

    This AI is great, and the video is perfect. For those experiencing errors in the last two blocks, here is what to do: Change the fifth block's code to this:
    import tensorflow as tf
    model = tf.keras.models.Sequential(tf.keras.layers.Dense(1))
    Run the fifth block a few times, then try again- it should work

    • @jasperanthonyperillo9686
      @jasperanthonyperillo9686 2 роки тому +4

      Thanks for this, this is the only code that worked with mine so you're a lifesaver

    • @MaximQuantum
      @MaximQuantum 2 роки тому +3

      Thank you, that is very helpful indeed!

    • @FTAVSLM
      @FTAVSLM Рік тому +2

      You are awesome!! it worked!!

    • @hilmanhilmi5789
      @hilmanhilmi5789 Рік тому +3

      thanks a lot man this helps a lot! may i know why do we need to code as you mentioned and how does this fix the error? im still new to machine learning and trying to get to the bottom of this.

    • @kyrilgarcia
      @kyrilgarcia Рік тому +1

      Thanks, this made it work. Probably something has changed in the syntax in last 2 years.

  • @nitrogenFox
    @nitrogenFox 3 роки тому +10

    I mean, I really don't understand much about advanced coding and algorithms like this, but it was interesting following along. Just wish I could understand more of whats going on...

    • @afraz8586
      @afraz8586 3 роки тому

      Follow a yt channel called Siraj Raval. Search for his videos about activation function, loss function, etc. It taught me a lot about
      AI / Machine Learning

  • @shabba194
    @shabba194 2 роки тому +16

    Good stuff young man. Very easy to follow and straight to the point. Appreciate you

  • @KennTollens
    @KennTollens Рік тому +2

    Breath of fresh air. Crystal clear and to the point. Thank you so much!

  • @nebiyoupaulos9800
    @nebiyoupaulos9800 3 роки тому +7

    GOOD Job Man! Love how humble you are!! Good Job!!!!!

  • @jaydee4397
    @jaydee4397 3 роки тому +1

    Bro said, "Imma set this up, knock out some pushups AND make some money showing you a commercial." That's hella inspirational.

  • @richardtrump2544
    @richardtrump2544 3 роки тому +24

    Great video, very clear. Any ideas about the warning at the end of the program about incompatable shapes between the model and the input? Obviously it works, but is this something that needs fixed in a more advanced application?

  • @connerd4772
    @connerd4772 Рік тому +1

    absolute legend, im in uni and you explained it better than my lecturers aha

  • @roberttrajkovski2015
    @roberttrajkovski2015 2 роки тому +7

    Great video... everything worked until i got to the model.fit(X_train, y_train,epochs=10) line.
    Got a ValueError Traceback (most recent call last)
    in ()
    ----> 1 model.fit(X_train, y_train,epochs=10)
    I checked X_train and it was 455x30 and y-train was 455x1. So dimension wise everything was good. I used X_train instead of your x_train but I was consistent so that was not an issue. I am wondering if the model.fit function has an issue. Any ideas?
    UPDATE:I changed the model.add(tf.keras.layers.Dense(256, input_shape=X_train.shape[1:], activation='sigmoid')) line and recompiled all code so it worked... THANKS

    • @Jim202030
      @Jim202030 2 роки тому

      You saved me, I was getting pretty bitter and couldn't figure it out. Its running now but I admit as of the writing of this comment I don't 100% get the fix. Going to rebreak it and debug more. But thanks much for this. You saved my pc from a punch

    • @weeeeeee7027
      @weeeeeee7027 2 роки тому

      Thx!

    • @eCabreravideo
      @eCabreravideo 2 роки тому +1

      I tried your update and still having the same issue. Any thoughts?
      "Epoch 1/10
      ---------------------------------------------------------------------------
      ValueError Traceback (most recent call last)
      in ()
      ----> 1 model.fit(X_train, y_train, epochs=10)"

    • @Katzegaming1
      @Katzegaming1 2 роки тому

      @@eCabreravideo did u fix it? im stuck

  • @DeshaeClips
    @DeshaeClips 9 місяців тому +1

    This is such a amazing tutorial im dumb with learning Coding i just started but i was able to understand this completely im definitely sticking around

    • @theadameubanks
      @theadameubanks  9 місяців тому

      Thanks for your comment! What types of tutorials would you like me to do next?

  • @mcsimp3695
    @mcsimp3695 3 роки тому +18

    ur a legend u deserve all the love

    • @echotube3111
      @echotube3111 3 роки тому +1

      Well the simp in your name isn't wrong lol

    • @mcsimp3695
      @mcsimp3695 3 роки тому +2

      @@echotube3111 i simp for this guy

  • @walterw3668
    @walterw3668 8 місяців тому

    Thank you just learned programming or understood more and more the basics in c# and was looking to use ai in my job in a production company. Your video was a huge help considering I did python last I think 7 or 8 months or even longer but loved the simplicity of that kind of subject. I know it can go complexer but the basics are super easy to learn because of you! So thank you and keep up your work man! :)

  • @Snorlaxxxxxxxxx
    @Snorlaxxxxxxxxx 3 роки тому +57

    this dude made this tutorial and did push ups lmao but still THANK YOU FOR TEACHING

    • @SquidBeats
      @SquidBeats 3 роки тому +3

      Jesus Christ is God and is the only way. Hell is real whether you believe it or not. I used watch wicked anime, mastberate/porn, vape, beer, violent video games and now I don’t do that anymore; I didn’t even think changing how I am now. Hell is real whether you believe it or not. There isn’t multiple ways; catholic, muslim, etc will lead you to hell and I was a catholic before!

    • @ATrueSonOfSparda
      @ATrueSonOfSparda 3 роки тому +3

      @@SquidBeatsYou're a bot. Whoever made you is an extremely sad human being. Attempting fear tactics to mold others to your religion goes against your religion. I'm sorry, but nobody cares. Liking your own comment is pointless. Quit attempting to force people to conform to your ideas just because you think enjoyable aspects of life are bad.

    • @rajarshiseal9476
      @rajarshiseal9476 3 роки тому

      @@SquidBeats so what religion should i be to avoid hell ? protestant ? jedi ?

    • @deadyanothaikiropool1chait713
      @deadyanothaikiropool1chait713 3 роки тому

      @@SquidBeats Some grandma died.and back from the dead.She described that hell/heaven is not real.Just a void and nothing.
      I'm in ROS(robotic) religion btw.

    • @timlee2773
      @timlee2773 2 роки тому

      @@deadyanothaikiropool1chait713 That's the Bible. Thank you for describing the death experience

  • @NoobTiki
    @NoobTiki 2 роки тому +2

    This dude needs more subs he has the best content ever.

  • @kevinwestrom4775
    @kevinwestrom4775 3 роки тому +11

    Great, great video. Using the Tensorflow & Keras with the scikit-learn was super cool, especially in knowing it will help doctors make important cancer diagnoses, makes it awesome. Great job!!

  • @stanisawkieniewicz499
    @stanisawkieniewicz499 3 роки тому +4

    I got this: ValueError: Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 398, 30), found shape=(None, 30)
    why? how to fix it?

  • @persefer
    @persefer 2 роки тому +3

    When I run;
    model.fit(x_train, y_train, epochs=1000)
    it gave an error with last line;
    ValueError: Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 455, 30), found shape=(None, 30)

    • @brianjones8994
      @brianjones8994 2 роки тому

      I'm getting this same error. Anyone know how to fix it?

  • @SaifSaif-ki6ql
    @SaifSaif-ki6ql Рік тому +2

    Guys I get value error when I run the "model.fit(x_train,y_train, epochs= 1000) any help plzzzz

  • @tejasplayzYT6648
    @tejasplayzYT6648 2 роки тому +4

    Very clear now I been looking for stuff about this for three hours and you made it nice and clear amazing video :)

  • @semlimi200
    @semlimi200 3 роки тому +25

    Wow I don't know much about Machine Learning I'm only thinking about learning it for now and I understood most of what you just taught! Awesome video make more like these!

    • @colinbalfour1834
      @colinbalfour1834 3 роки тому +5

      Hey, just a tip for you as you go about learning. I see videos like these as a cool introduction to the subject that's more just like "ooh cool, look what that does". The mistake I often see people make is they just watch lots of videos like these, thinking they're learning. You're not really learning anything, you just know the pure basics of how a NN works. If you really want to get into machine learning, it's a lot of math and theory - so be prepared for that. If you have any questions feel free to ask :p

    • @muhammedjaabir2609
      @muhammedjaabir2609 3 роки тому

      @@colinbalfour1834 i am currently learning ml, i do come up with some doubt whenever i work with some datasets , may i know your discord or any other social media you have

    • @colinbalfour1834
      @colinbalfour1834 3 роки тому

      @@muhammedjaabir2609 lo yt keeps deleting my comments, whats your discord

    • @moisturano
      @moisturano 2 роки тому

      ​@@colinbalfour1834 just wanting a subsubject name, if you could go back in time right now and relearn some of these data science concepts, how would you start??
      and for a more specific one, i learn by creating my own mental model of 'axioms' or rules in structure as opposed to studying rigorously, so in my benefit do you happen to know of any group of topics or problems that show the majority of general rules id see in the subject? maybe moreso for beginners

    • @miken1299
      @miken1299 2 роки тому

      @@colinbalfour1834 hey, what do you think is the best way to learn the mathematics behind neural networks? I’ve tried to learn some math regarding linear algebra and stuff but i’m a bit lost on how to apply it directly to machine learning.

  • @MrAlivallo
    @MrAlivallo 2 роки тому +9

    Hi @Khanrad ; can you make a video on how to mini-graph those outputs inside the IDE? So we can repeatedly visualize our output? Scrolling through the data is OK when the set it small. Ideally Colab-Jupyter would have a button to the right of the output to mini-graph upon completion. Further to that I'm aware output should be stored for CI/CD analysis later. It's a convivence request.
    I use Low Code in Azure-ML, I can highlight output and it will show a mini-graph. or I can export it to PowerBI. Output in my environment is saved in the dataverse and ETL with Synapse.

    • @JayniusLab
      @JayniusLab Рік тому

      I use the graph thingies with this code:
      import pandas as pd
      import matplotlib.pyplot as plt
      import seaborn as sns
      from sklearn.model_selection import train_test_split
      import tensorflow as tf
      def visualize_output(output):
      if isinstance(output, pd.DataFrame):
      for column in output.columns:
      _plot_mini_graph(output[column], column)
      elif isinstance(output, pd.Series):
      _plot_mini_graph(output, output.name)
      else:
      print("Invalid input type. Please provide a DataFrame or Series.")
      def _plot_mini_graph(data, column_name):
      plt.figure(figsize=(8, 4))
      if data.nunique()

  • @_ifly
    @_ifly 3 роки тому +4

    good job. the best teaching is when you make it simple.

  • @nmkloster
    @nmkloster 2 дні тому

    Help! I'm trying to learn how this works and completed this example. I was thinking that I could try doing a weather forecast and try to stuff whatever I can think of into the csv file - recent temperatures from various places, date, co2 readings, etc. Any hints on how I can expand the model to cover my example? Or perhaps another tutorial?

  • @gutardivo
    @gutardivo 3 роки тому +4

    Great content! Could u make a part 2 predicting with new dataset? Dunno how to do it here!

    • @theadameubanks
      @theadameubanks  3 роки тому +3

      Sure. What new dataset would you like me to use?

    • @gutardivo
      @gutardivo 3 роки тому +3

      @@theadameubanks something like data collected in a week in cancer unit in some hospital, like ur cancer.csv, but diagnosis column is empty to AI fill it :) It'd be awesome, I'm studying how I can do it yet in a simple way hahah

    • @theadameubanks
      @theadameubanks  3 роки тому +3

      @@gutardivo if you want to make predictions on new data points, use y_predictions = model.predict(x)

    • @gutardivo
      @gutardivo 3 роки тому +2

      @@theadameubanks yeah, I tried it i.imgur.com/jblBhox.png , idk where I put the new dataset

    • @theadameubanks
      @theadameubanks  3 роки тому +3

      @@gutardivo upload the dataset csv to colab and change the name of the dataset in the notebook to equal the name of the file you uploaded

  • @mrbreezybright
    @mrbreezybright 2 роки тому +1

    Bro, I just finished watching this 2022 July... And I really appreciate your efforts so much.

  • @jonathancorrales7427
    @jonathancorrales7427 3 роки тому +4

    thank you man, this seems so easy to understand. thanks again. great job.

  • @NevsTechBits
    @NevsTechBits 7 місяців тому

    Thank you for your contributions to society and the internet with your free information, Brother.

  • @MrXiroz
    @MrXiroz 3 роки тому +12

    Hi Khanrad, great video.
    When I try to run your code as wel as my own version i get the following error at the last step:
    'ValueError: Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 455, 30), found shape=(None, 30)'
    What do you think could be the issue?

    • @decordova.
      @decordova. 3 роки тому +1

      same can't figure it out.

    • @sirgb7
      @sirgb7 3 роки тому

      I got the same thing

    • @Liquence
      @Liquence 3 роки тому

      Me too

    • @haimijordaan1353
      @haimijordaan1353 3 роки тому

      me too

    • @haimijordaan1353
      @haimijordaan1353 3 роки тому +6

      This seems to work. input_shape = [None, x_train.shape[0], x_train.shape[1]]

  • @AnandKumar-dm8nl
    @AnandKumar-dm8nl 9 місяців тому

    Broh you're legit. Keep going we are expecting more tech content with you.

  • @ricardoraulino-guitar
    @ricardoraulino-guitar 3 роки тому +3

    Fantastic class, Bro!
    Thank you Very much!

    • @nik7069
      @nik7069 3 роки тому

      You got it to work?

  • @alyaaka82
    @alyaaka82 Рік тому

    This video is very good and you made the whole concept very easy to grasp beside that you have a strong good voice that keep me concentrating with you through the whole video, thank you.

  • @yannhk
    @yannhk 3 роки тому +4

    Can you do more AI or ML videos that could apply to daily life? Thanks man

    • @akankshach3537
      @akankshach3537 3 роки тому

      ua-cam.com/video/CT6Zif1cLTM/v-deo.html

  • @PhilipMorrison3
    @PhilipMorrison3 Рік тому +1

    Fantastic videos! Very easy to follow and actionable. Will absolutely share with everybody interested in this field. One quick note, when, doing anything in the medical field you have to understand the truth labels of the data.

  • @jxoesneon
    @jxoesneon 3 роки тому +4

    To make the code work just change Input_shape=x_train.shape to input_shape=x_train.shape[1:]

    • @chandlerlabs2478
      @chandlerlabs2478 3 роки тому

      Thx;-)

    • @pedrom677
      @pedrom677 3 роки тому

      It is still not working for me. Do you have any other option?

    • @chandlerlabs2478
      @chandlerlabs2478 3 роки тому

      @@pedrom677 Go back and start over;-) Not saying that to be mean, but sometimes you spend more "cycles" looking for a (:[{ or ., that you would with a clean notebook. The code above worked for me, so have hope.

  • @KelGangi
    @KelGangi 2 роки тому +2

    My dude, this was very helpful for my research! Thank you!

  • @hydrtd_9753
    @hydrtd_9753 3 роки тому +14

    Nice video :) but how do you actually make the ai predict outcomes?

    • @davidusw5945
      @davidusw5945 3 роки тому +2

      I'm not an expert so I might be wrong, but I think based on the error percentage the network adjusts its weights for each element in every layer. So the next time you put in the same numbers you'll get a diffrent result. And it repeats that many many times and the error percentage gets smaler and smaler and the smaler it is the higher the possibility it'll calculate right the next time. I didn't watched the video entirely so I hope I didn't confused you with that.

    • @imaaansara2078
      @imaaansara2078 3 роки тому +1

      If statement is the answer

  • @MdKamrulHasan-ux4zz
    @MdKamrulHasan-ux4zz 3 роки тому +1

    your teaching style is awesome

    • @الإسلامدينالحق-خ5ت
      @الإسلامدينالحق-خ5ت 3 роки тому

      My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life
      ua-cam.com/play/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-.html

  • @leocapuzzi
    @leocapuzzi 2 роки тому +3

    I was having the same issue as everyone and fixed by using this settings on the 5th block of code, when importing tensorflow
    ---------------------------------------------------------
    import tensorflow as tf
    model = tf.keras.models.Sequential(tf.keras.layers.Dense(1))

  • @trevordsouza2420
    @trevordsouza2420 Рік тому +1

    Wow. Thank you for this video. I’m going to put this together. How can you make the AI work with other radiographs like musculoskeletal ultrasound, MRI and the like?

    • @trevordsouza2420
      @trevordsouza2420 Рік тому +1

      Also would there be any benefit in running the AI on a quantum computer other than speed?

  • @charlesescano
    @charlesescano 3 роки тому +4

    How to make A.I. Aware of it's Surrounds?

    • @akgamez586
      @akgamez586 3 роки тому +1

      Guess it's gonna need a heck lot of sensors

    • @colinbalfour1834
      @colinbalfour1834 3 роки тому

      depends what you mean by "aware". You'll likely need different types of sensors, then a lot of programming to analyse the data collected and create awareness. If you provide more details I might be able to help :)

    • @diamond_h0us
      @diamond_h0us 3 роки тому

      Give it sensors and teach it to use python.

  • @Niesrind
    @Niesrind 3 місяці тому

    Since the AI is now trained, I would have liked to see how we could use it like entering the measured data and getting a "this patient is likely to have a malignant tumor with a $percent_value propability."

  • @haribhushith7258
    @haribhushith7258 3 роки тому +3

    Thank you so much, this was very educational.

  • @kaigoltz3073
    @kaigoltz3073 Рік тому +1

    now that the model has been trained how can we actually use it?

  • @nobodyabc7402
    @nobodyabc7402 3 роки тому +11

    thank you so much for this:))

  • @jinshamai2918
    @jinshamai2918 Рік тому +1

    question: how to run this then? like will it say 0 or 1 as diagnosis?

  • @obaimoh2478
    @obaimoh2478 3 роки тому +4

    Thank you man this was an amazing tutorials , but i have got this error ( ValueError: Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 455, 30), found shape=(None, 30)) , can you fix this .

  • @0MVR_0
    @0MVR_0 3 роки тому

    The avenues for making those recognized patterns useful are diminished by illiteracy concerning the source signals and the lack of care taken in organizing the structure of the machine.
    Similar to drawing constellations whereby connections are made between neighboring stars, yet those same celestial bodies are projected onto a two dimensional retina.
    One might call what the Greeks did image recognition.

  • @G-Suth
    @G-Suth 3 роки тому +3

    ummm, its having trouble seeing the canser.csv file, can you help with that at all?

    • @jeremiahthomas9630
      @jeremiahthomas9630 3 роки тому +1

      it's cancer and if that doesn't work, try '/cancer.csv' since that's the correct path

  • @EAGLETECHHACKING
    @EAGLETECHHACKING Рік тому +1

    Very clear , easy and straight to the point. very good explanation

  • @UtimateGearsPlayer
    @UtimateGearsPlayer 3 роки тому +5

    This something I really wanna do but don’t know how to actually teach myself

    • @lawlit450
      @lawlit450 3 роки тому +2

      Is it harder than Hakai Lord berrus?

    • @UtimateGearsPlayer
      @UtimateGearsPlayer 3 роки тому +2

      Yes , yes it is

    • @echotube3111
      @echotube3111 3 роки тому

      Just put enough work into it and you'll be able to figure it out

    • @colinbalfour1834
      @colinbalfour1834 3 роки тому +2

      I would recommend going through at least the first year or two of a traditional CS curriculum. Learn a programming language, and get some foundational math knowledge like calc and discrete math. Work on learning algorithms and data structures, and find projects at your level. Once you can do some relatively complex projects, try some "AI" problems - something very basic. Maybe start with like a MiniMax, or a simple Genetic Algorithm. From there you'll absolutely want Linear Algebra and probably some applied statistics. Working through integral and mv calc will help with more complex problems like backpropogation/feedforward. I know that's all really vague - but if you have any more specific questions I'd be happy to answer them

    • @GatileoGatilei
      @GatileoGatilei 3 роки тому

      Wait for open ai codex

  • @jeffparker4840
    @jeffparker4840 3 місяці тому

    I could use this exact script to build a stock trading bot using a ton of indicators for each column and 5 minute candles for the rows. If the AI could hit 97% accuracy on the stock market I could own the world in a year. lol. Solid video my guy, absolutely going dig into writing some AI code in python!

    • @theadameubanks
      @theadameubanks  3 місяці тому

      Yeah, you should check out my AI stock prediction video as well:
      ua-cam.com/video/5xvAtypnLC0/v-deo.html

  • @develxper7931
    @develxper7931 2 роки тому +3

    Damn , i've misunderstood alot of Things from different tutorials , your explanation is so clear and i understand alot things , thanks

  • @WassupBeijing-x3f
    @WassupBeijing-x3f 2 місяці тому

    I wonder how did you get the codes you type to make ai, it's so AWESOME

  • @joevj76
    @joevj76 3 роки тому +3

    Thank you for sharing this.. helps me get started..
    But I get error when I run "model.fit(x_train, y_train, epochs=1000)"
    Error is pasted below.
    Is there any clue on what could be wrong?
    Thanks in advance!
    -----------------------
    Epoch 1/1000
    ---------------------------------------------------------------------------
    ValueError Traceback (most recent call last)
    in ()
    ----> 1 model.fit(x_train, y_train, epochs=1000)
    1 frames
    /usr/local/lib/python3.7/dist-packages/keras/utils/traceback_utils.py in error_handler(*args, **kwargs)
    65 except Exception as e: # pylint: disable=broad-except
    66 filtered_tb = _process_traceback_frames(e.__traceback__)
    ---> 67 raise e.with_traceback(filtered_tb) from None
    68 finally:
    69 del filtered_tb
    /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/func_graph.py in autograph_handler(*args, **kwargs)
    1127 except Exception as e: # pylint:disable=broad-except
    1128 if hasattr(e, "ag_error_metadata"):
    -> 1129 raise e.ag_error_metadata.to_exception(e)
    1130 else:
    1131 raise
    ValueError: in user code:
    File "/usr/local/lib/python3.7/dist-packages/keras/engine/training.py", line 878, in train_function *
    return step_function(self, iterator)
    File "/usr/local/lib/python3.7/dist-packages/keras/engine/training.py", line 867, in step_function **
    outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "/usr/local/lib/python3.7/dist-packages/keras/engine/training.py", line 860, in run_step **
    outputs = model.train_step(data)
    File "/usr/local/lib/python3.7/dist-packages/keras/engine/training.py", line 808, in train_step
    y_pred = self(x, training=True)
    File "/usr/local/lib/python3.7/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler
    raise e.with_traceback(filtered_tb) from None
    File "/usr/local/lib/python3.7/dist-packages/keras/engine/input_spec.py", line 263, in assert_input_compatibility
    raise ValueError(f'Input {input_index} of layer "{layer_name}" is '
    ValueError: Input 0 of layer "sequential" is incompatible with the layer: expected shape=(None, 455, 30), found shape=(None, 30)

    • @AlexGarcia-cr5st
      @AlexGarcia-cr5st 3 роки тому +1

      I am getting the same error

    • @arthurlage5859
      @arthurlage5859 3 роки тому +1

      use model.add(tf.keras.layers.Dense(256, input_shape=x_train.shape[1:], activation='sigmoid'))

    • @Katzegaming1
      @Katzegaming1 2 роки тому +1

      @@arthurlage5859 didnt work

  • @fx6042
    @fx6042 2 роки тому +1

    Can't get your code or mine to run . Keep getting epoch 1/1000 value error. It also says layer 0 of Sequential is incompatible.

  • @sherllymentalism4756
    @sherllymentalism4756 3 роки тому +2

    how to we use this to predict cases? If I give it a csv with the x datasets, how can I make it fill out the diagnosis column?
    Thanks :)

    • @theadameubanks
      @theadameubanks  3 роки тому +7

      y_predictions = model.predict(x)

    • @sherllymentalism4756
      @sherllymentalism4756 3 роки тому +2

      @@theadameubanks thanks for replying, I figured it out eventually aha. Great content :)

    • @yesno9927
      @yesno9927 3 роки тому +1

      @@theadameubanks so wait do i just type that in or what cause im realy confused as to how to give it new data to predict

    • @Hello-hh6bi
      @Hello-hh6bi 3 роки тому +2

      @@theadameubanks Hey Khanrad, great videos! Love them you are so talented!
      How do you fill in the formula to make a prediction? Tried without any success...Thank you for your help :)

  • @shamjamali3972
    @shamjamali3972 2 роки тому +2

    how do you feed the AI data? Do you just evaluate a random x_test matrix with it and it auto classify y values?

  • @BCCDAILYPAK
    @BCCDAILYPAK 3 роки тому +3

    Ya ALLAH har insan kamyab ho har insan ko sehat izat or kamyabi ata farma tohi Malik hay meray ALLAH reham farma.

  • @rusticagenerica
    @rusticagenerica 2 роки тому +2

    Well done !! Thanks so much. Would you be able to advise on how to perform the AI Generation on our own computer? Running code on Google's computers is not cool AT ALL. Make you dependent, strictly no privacy, resources are limited, requires to be online . . . A great tool, but super limited

  • @manasisingh294
    @manasisingh294 3 роки тому +3

    Hey!
    Thanks a lot for this tutorial man. I was able to follow-up with most of the things described here but got stuck at Block-6 : Line 9.
    I would really appreciate if you could explain the problem...it's showing {name 'x_train' is not defined} and {name 'model' is not defined}.

    • @haribhushith7258
      @haribhushith7258 3 роки тому

      Oh it only works if you run all the code blocks before this code block, I got the same issue, I reloaded the website and ran every single cell from the start to finish and then it started working again.

  • @izaiahschonebeck8850
    @izaiahschonebeck8850 4 місяці тому +1

    Every time I double click on the data set in collab it asks if I want to download load I says nothing about the diagnosis

  • @MeeusenBelastingadvies
    @MeeusenBelastingadvies 2 роки тому +4

    Hi, nice video! clear explanation of building an AI in Python. Sadly I'm not really good at coding in python. I'm wondering if you could help me with something.
    I'm a tax law student engaged in compliance activities. For this job I have to read loads of annual accounts from companies in order to submit tax returns.
    I'm actually looking for someone who could help me develop an AI that could get specific data out of PDF files quickly and fill it in in the right colums on a tax return to speed up the process. If you know anything or anyone who would like to do this hit me up! (we could hit a jackpot)

    • @colinbalfour1834
      @colinbalfour1834 2 роки тому

      I think OCR is what you’re looking for, but it’s probably not viable with sensitive data because it’s a new technology and prone to mistakes

    • @yamanjain
      @yamanjain 2 роки тому

      what you're looking for probably won't need ai. share your email id and I can get this done

  • @didyouknow19256
    @didyouknow19256 2 роки тому +2

    I have a question. How to you make it actually identify the cancer? I am just a beginner, so this might be a stupid question. Btw, thank you @Saad Humayun for the comment, it saved me.

  • @wrench697
    @wrench697 3 роки тому +11

    I wanna make an AI and name it JARVIS and some god will hot his hammer on the AI and he'll come to life as Vision
    MCU fans know who I'm talking about

    • @jeffbrownstain
      @jeffbrownstain 3 роки тому

      Or, and this is just an idea; come up with something original

  • @leongodwin69
    @leongodwin69 Рік тому +1

    Wow, this is amazing. This is my first ever attempt at building something. Quick question though, if I increase my neurons to 512, and my epochs to 2000, why would my accuracy go down?

  • @briangarcia8582
    @briangarcia8582 2 роки тому +3

    Garbage. code doesn't work... recommendations for fixing it do not work either...

    • @epicboy330
      @epicboy330 6 місяців тому

      That’s what we call an issue of skill

  • @yamenhammad9448
    @yamenhammad9448 11 місяців тому

    It was amazing thank you .. but can creat a model using more complex data set, i mean use some feature enginering and add more layers and use earky stopping method ...etc

  • @cozy413
    @cozy413 3 роки тому +3

    This was good

  • @EdHunt-d7y
    @EdHunt-d7y Рік тому +1

    x_train.shape didn't work had to modify code to:
    model.add(tf.keras.layers.Dense(256, input_shape=(None, 455, 30), activation='sigmoid'))

  • @HakeemRansdell
    @HakeemRansdell 2 роки тому +1

    Found the solution to the end, you have to put “ epochs = 1000” you have to separate everything

  • @Sanjid-HasanP
    @Sanjid-HasanP Рік тому

    This was really helpful me! I understand they are supervised dataset and how do you train when you get some books or pdf?like notebookLLM?

  • @midosasuke5035
    @midosasuke5035 2 роки тому +1

    thanks for the video... btw how can i make my own data sets? i mean how can i extract tumor features from images?

  • @DavoodUSD
    @DavoodUSD 10 місяців тому +1

    hi I want to create my own AI in Language and vocabulary learning. can you tell me how can I start?

    • @theadameubanks
      @theadameubanks  9 місяців тому

      I'm actually working on something very similar. Stay tuned in the coming months :)

  • @nathia1597
    @nathia1597 7 місяців тому

    It made me feel like a programmer for a moment, even though I've never programmed in my life

  • @spoofersgaming
    @spoofersgaming 2 роки тому +1

    Hey, I'm learning machine learning for fun and was wondering how I would be able to input new x data for the AI to generate y data for

  • @Fileasf
    @Fileasf 7 місяців тому

    Great video!! I have a question if the to be predicted variable is not binary but say from 1-10 how would that change the code? Sigmoid for example?

    • @theadameubanks
      @theadameubanks  7 місяців тому +1

      You could just scale it down so instead of going from 0-10 make it go from 0-1. Or scale it up.

    • @Fileasf
      @Fileasf 7 місяців тому

      Thank you for the answer!!

  • @robeik
    @robeik 10 місяців тому

    Thanks. A great introduction to what this platform can do. However, what this does not do it provide useful information for using the created model. This has many layers, and so it's no use asking which input features are useful. But how can an individual case be tested with the model?

  • @ThatOneCodeGuy_MC
    @ThatOneCodeGuy_MC Місяць тому

    this is all fun and games and a very good tutorial, but how do i create my own example files and adapt it to my needs?