Scikit Learn Machine Learning SVM Tutorial with Python p. 2 – Example




[ad_1]

In this machine learning tutorial, we cover a very basic, yet powerful example of machine learning for image recognition. The point of this video is to get you familiar with machine learning in Python with sklearn, but also to show you that the actual machine learning part is the easy part.

Playlist link: https://www.youtube.com/watch?v=URTZ2jKCgBc&list=PLQVvvaa0QuDd0flgGphKCej-9jp-QdzZ3&index=2

The real hard part is everything else. Getting data, organizing data, labeling data, scaling data…. and more.

sample code: http://pythonprogramming.net

http://seaofbtc.com
http://sentdex.com
http://hkinsley.com
https://twitter.com/sentdex

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6

Source


[ad_2]

Comment List

  • sentdex
    November 11, 2020

    Your algorithm works very bad when you run the cross-validation over the test data, with the accuracy of about %10!! The accuracy of training data is %100 (!) and it means we have a serious overfitting problem.

  • sentdex
    November 11, 2020

    how you can load the data and image I don't see it in you code 🙁 ., so i have problem with digits.data

  • sentdex
    November 11, 2020

    Hello, I have a problem in a code
    I wrote code exactly as the same written code, "print ('Prediction:', clf.predict(digits.data[-1]))"
    but I got the below error when I run it.
    Error:
    Expected 2D array, got 1D array instead:

  • sentdex
    November 11, 2020

    hello ! could you please hellp me i working on voice recognition with EMD not MFCC so i need some help please on SVM

  • sentdex
    November 11, 2020

    so gamma here is like learning rate and the much smaller value the better accuracy to get the precise lower point in the parabola graph but i think with much low values it will take such long time???
    correct me if understood wrong

  • sentdex
    November 11, 2020

    Why don’t you try this whole thing on Jupyter notebook

  • sentdex
    November 11, 2020

    Traceback (most recent call last):

    File "C:Usersv65DesktopPythonsklearn.py", line 3, in <module>

    from sklearn import datasets

    File "C:Usersv65DesktopPythonsklearn.py", line 3, in <module>

    from sklearn import datasets

    ImportError: cannot import name 'datasets' from 'sklearn' (C:Usersv65DesktopPythonsklearn.py)

    >>>

  • sentdex
    November 11, 2020

    I ran the same code on my idle. and I got following error:

    Expected 2D array, got 1D array instead:

    array=[ 0. 0. 2. 10. 7. 0. 0. 0. 0. 0. 14. 16. 16. 15. 1. 0. 0. 4.

    16. 7. 3. 16. 7. 0. 0. 5. 16. 10. 7. 16. 4. 0. 0. 0. 5. 14.

    14. 16. 4. 0. 0. 0. 0. 0. 0. 16. 2. 0. 0. 0. 4. 7. 7. 16.

    2. 0. 0. 0. 5. 12. 16. 12. 0. 0.].

    Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.

  • sentdex
    November 11, 2020

    Hi Sentdex, thanks for your work. but why did you fit and predict with the same data set? shouldn't you split it into two sets for training and testing?

  • sentdex
    November 11, 2020

    Am I the only one who watched all the video twice and still have no idea how to code own, except of copying code from video??

  • sentdex
    November 11, 2020

    cannot import name 'cross_validate' from 'sklearn'

  • sentdex
    November 11, 2020

    how can I load the dataset with pandas

  • sentdex
    November 11, 2020

    Great video. Thank you for sharing.

  • sentdex
    November 11, 2020

    please am trying to perform landsat image classification using machine learning algorithms but am confused about how to get my training and testing data. Any help?

  • sentdex
    November 11, 2020

    Gamma is a parameter for the default RBF Kernel which is used by the SVM classifier.
    Alpha is the learning rate used in Gradient descent to find the global minimum for the function which needs to be minimized to find the optimum weights for the decision boundary !!

  • sentdex
    November 11, 2020

    How to extract features of image in store in csv form to train network….
    Please answer I am very confused

  • sentdex
    November 11, 2020

    The Most problem in your videos you don't clean the previous code when you start a new video fact is that if some line of code is not clear/understand then all the next videos will not understand

  • sentdex
    November 11, 2020

    sir can you explain
    why use c=100

  • sentdex
    November 11, 2020

    Hey bro. Can you give me a image processing project.. I want to learn image processing.. Please provide me the project 🙏😔

  • sentdex
    November 11, 2020

    who the fuck wants to use built in datasets? useless

  • sentdex
    November 11, 2020

    hey … it says "AttributeError: 'module' object has no attribute 'imshow'"

  • sentdex
    November 11, 2020

    hi,I am getting attribute error
    like:

    Traceback (most recent call last):

    File "D:/google download/tesseract-python/tesseract-python/sendex.py", line 21, in <module>

    plt.imshow(digits.image[:-1], cmap=plt.cm.cmap_d, interpolation="nearest")

    File "C:UsersmithileshPycharmProjectscheckvenvlibsite-packagessklearnutils_init__.py", line 107, in __getattr_

    raise AttributeError(key)

    AttributeError: image

    please help to solve me this

  • sentdex
    November 11, 2020

    What if the target is a String ? Like classifying animals and their weight

  • sentdex
    November 11, 2020

    digits.data[-6].reshape(1, -1)

  • sentdex
    November 11, 2020

    Big Thank, I come to some blog, but I'm still not understand.

    But here, I'm understand now,

  • sentdex
    November 11, 2020

    sir what is the meaning of the clf variable

  • sentdex
    November 11, 2020

    Hi,
    Does Gamma parameter relate to over fitting? That is, the more precise it is, the better prediction based on the given training set. But can't predict it right when a new number is provided? Thanks in advance

  • sentdex
    November 11, 2020

    how can i use svm for face recognition ??

  • sentdex
    November 11, 2020

    so how many dimensions is the svm?

  • sentdex
    November 11, 2020

    I thought gamma was just a parameter of the
    RBF kernel that determines the influence each point has on the decision boundaries.

  • sentdex
    November 11, 2020

    ML + ASMR

  • sentdex
    November 11, 2020

    Can you use this code to compare 2 images?

  • sentdex
    November 11, 2020

    Hey everyone,
    Can you describe the working of 'SVC'
    My code has not executed.
    It shown an AttributeError:
    module 'sklearn' has no attribute 'SVC'

Write a comment