2/23/2016

Deep learning study - logistic classifier #3

Logistic Classifier 


The logistic classifier is similar to equation of the plane.

W is weight vector, X is input vector and y is output vector.
b is bias that to adjust boundary base.

Anyway, this form is context of logistic regression, called logists.

y is result value of vector calculation that is score, that is not probability.
So, to change a probability, use softmax function.


So, we can choose what probability is close to 1.


Softmax example code in python
///
scores = [3.0, 1.0, 0.2]
import numpy as np
def softmax(x):
    """Compute softmax values for each sets of scores in x."""
    return np.exp(x) / np.sum( np.exp(x), 0 )
print(softmax(scores))

///
result is
[ 0.8360188   0.11314284  0.05083836]


Softmax plot example in python
///
# Plot softmax curves
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(-2.0, 6.0, 0.1)
scores = np.vstack([x, np.ones_like(x), 0.2 * np.ones_like(x)])

plt.plot(x, scores.T, linewidth=2)
plt.show()

plt.plot(x, softmax(scores).T, linewidth=2)
plt.show()
///

first plot is

second plot is

The second graph is softmax output value.
The value of the blue line is grows, lines of green and red is almost close to zero.


one more things,
What happen if scores are multiplied or divided by 10?
///
scores2 = np.array([3.0, 1.0, 0.2])
print( softmax( scores2 * 10))
print( softmax( scores2 / 10))
///

[ 9.99999998e-01 2.06115362e-09 6.91440009e-13]
[ 0.38842275 0.31801365 0.2935636 ]

If multiplied by the growing differences
If divided, the smaller the difference.


We can take advantage of these properties.
We'll want our classifier to not be too sure of itself in the beginning. -> divided
And then over time, it will gain confidence as it learns. -> multiply







33 comments:

  1. The information distribution center offloads information from a huge number of sources.data science course in pune

    ReplyDelete
  2. Well, The information which you posted here is very helpful & it is very useful for the needy like me.., Wonderful information you posted here. Thank you so much for helping me out to find the Data science course in Mumbai
    Organisations and introducing reputed stalwarts in the industry dealing with data analyzing & assorting it in a structured and precise manner. Keep up the good work. Looking forward to view more from you.

    ReplyDelete
  3. Such a very useful article. I have learn some new information.thanks for sharing.
    data scientist course in mumbai

    ReplyDelete
  4. cool stuff you have and you keep overhaul every one of us
    Data Analytics Course in Mumbai

    ReplyDelete
  5. Such a very useful article. Very interesting to read this article. I have learn some new information.thanks for sharing. ExcelR

    ReplyDelete
  6. I am impressed by the information that you have on this blog. It shows how well you understand this subject.
    ExcelR Data Analytics courses

    ReplyDelete
  7. Very nice blog here and thanks for post it.. Keep blogging...
    ExcelR data science training

    ReplyDelete
  8. Attend The Analytics Course in Bangalore From ExcelR. Practical Analytics Course in Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Analytics Course in Bangalore.
    ExcelR Analytics Course in Bangalore

    ReplyDelete
  9. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
    ExcelR data science course in mumbai

    ReplyDelete
  10. I am impressed by the information that you have on this blog. It shows how well you understand this subject.
    data analytics courses

    ReplyDelete
  11. This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck... data science course

    ReplyDelete
  12. I have read your blog. It's very attractive and impressive. Very systematic indeed! Excellent work!
    Data Science Course in Marathahalli
    Data Science Course Training in Bangalore

    ReplyDelete
  13. Through this post, I know that your good knowledge in playing with all the pieces was very helpful. I notify that this is the first place where I find issues I've been searching for. You have a clever yet attractive way of writing.

    data analytics courses

    data science interview questions

    business analytics courses

    data science course in mumbai

    ReplyDelete
  14. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.

    business analytics course

    data analytics courses

    data science interview questions

    data science course in mumbai

    ReplyDelete
  15. The information provided on the site is informative. Looking forward more such blogs. Thanks for sharing .
    Artificial Inteligence course in Mysuru
    AI Course in Mysuru

    ReplyDelete
  16. The concept has been explained very well. Gained clear knowledge about the prominence of AWS
    AWS Training in Hyderabad

    ReplyDelete
  17. wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article resolved my all queries.
    Data science Interview Questions

    ReplyDelete
  18. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea.
    Data Science Training In Hyderabad

    ReplyDelete
  19. You have explained the concept really well. Was looking for this information from a while & luckily I stumbled upon your post. Looking forward for more of such informative updates from you

    Data Science Training In Hyderabad
    Data Science Course In Hyderabad

    ReplyDelete
  20. wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article resolved my all queries.
    Data Science Course

    ReplyDelete
  21. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.

    data science course

    ReplyDelete
  22. You have explained the concept really well. Was looking for this information from a while & luckily I stumbled upon your post. Looking forward for more of such informative updates from you

    Data Science Training In Hyderabad
    Data Science Course In Hyderabad

    ReplyDelete
  23. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.

    data science course

    ReplyDelete
  24. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
    Python Training in Hyderabad
    Python Course in Hyderabad
    Python Institute in Hyderabad

    ReplyDelete
  25. I am looking for and I love to post a comment that "The content of your post is awesome" Great work!

    data science course

    ReplyDelete
  26. Thank you sharing such wonderful Articles
    AI Training In Hyderabad

    ReplyDelete
  27. Good Article .we are sharing a such wonderful information
    AWS Training In Hyderabad

    ReplyDelete
  28. wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article resolved my all queries. keep it up.
    data analytics course in Bangalore

    ReplyDelete
  29. Attend The Data Science Courses From ExcelR. Practical Data Science Courses Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Science Courses.
    Data Science Courses

    ReplyDelete
  30. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance

    ReplyDelete