Sunday, March 13, 2016

Learning Sinus Function Using Neural Network


Recently I stumbled upon an excellent demo of a 2 layer neural network written by Florian Muellerklein: https://github.com/FlorianMuellerklein/Machine-Learning.

It is written in Python using numpy and focuses on digit recognition based on sklearn dataset.
I decided to play around with it and add visualization for learning process of a sinus function.
I used matplotlib for creating an animation.

The neural network implementation is typical. It uses standard gradient descent procedure with some optimizations like momentum and regularization (also random initialization).
If you are interested in understanding how exactly gradient descent works, I highly recommend an article from Matt Mazur: http://mattmazur.com/2015/03/17/a-step-by-step-backpropagation-example.

The network architecture I used was following:

  • 1 input neuron (x parameter of sinus function)
  • 60 hidden neurons
  • 1 output value (the function result)

Here is a link to source code: https://github.com/rafalrusin/Machine-Learning/tree/master2

It converges pretty well. Here's an animation showing convergence of sinus function during consecutive learning iterations (10 learing iterations per frame):



Machine Learning is a very fascinating domain that has been emerging rapidly over recent years, mainly in visual object recognition. I hope that it keeps this pace in future (or even exceeds it!).

55 comments:

  1. Nice to see your blog post.. I really enjoyed by reading your blog post. Thanks a lot for sharing this with us.. Keep on sharing like this informative post.
    Hadoop Training institute in Chennai

    ReplyDelete


  2. Great and useful article. Creating content regularly is very tough. Your points are motivated me to move on.



    Manual testing training in Chennai

    Selenium training in Chennai

    Software testing training in Chennai

    ReplyDelete
  3. Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.

    Salesforce Training in Chennai

    ReplyDelete
  4. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

    Salesforce Training in Chennai

    ReplyDelete
  5. Really it was an awesome article...very interesting to read..You have provided an nice article....Thanks for sharing..
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  6. Thank you for sharing such great information with us. I really appreciate everything that you’ve done here and am glad to know that you really care about the world that we live in.
    Salesforce Training in Chennai
    German Classes in Chennai
    Salesforce Course in Chennai
    Salesforce developer training in chennai
    German Language Course in Chennai
    German Courses in Chennai

    ReplyDelete
  7. Hi! I have more then 4 Years of experience and I am the Founder of a Digital Marketing Agency in Delhi. I just want to say thank you for posting such a useful, impressive and a wicked article.

    ReplyDelete
  8. Hi! I have more then 4 Years of experience and I am the Founder of a Website Development Company in Rohini, Delhi. I just want to say thank you for posting such a useful, impressive and a wicked article.

    ReplyDelete
  9. Thanks for giving great kind of information. So useful and practical for me. Thanks for your excellent blog, nice work keep it up thanks for sharing the knowledge.
    Epoxy Grout manufacturer in delhi

    ReplyDelete
  10. nice topic which you have choose.
    second is, the information which you have provided is better then other blog.
    so nice work keep it up. And thanks for sharing. Laminated Doors manufacturer in hubli

    ReplyDelete
  11. Thanks for giving great kind of information. So useful and practical for me. Thanks for your excellent blog, nice work keep it up thanks for sharing the knowledge. led lawn lights in delhi

    ReplyDelete
  12. THANKS FOR INFORMATION

    you can search low-cost website with high-quality website functions.
    Today Join Us
    Call: +91 - 8076909847

    web development company in delhi

    levantro
    interior designers delhi


    livewebindia
    web design company

    top seo company in delhi

    Best It Service Provider:

    1. Website Designing And Development.
    2. SEO Services.
    3. Software Development.
    4. Mobile App Development.

    ReplyDelete
  13. Nice blog! Thanks for sharing with us. It was really helpful for me. Visit for
    Logistics Company in India
    Freight Forwarders in India

    ReplyDelete
  14. Thanks for sharing such helpful an informative article. I hope you will keep sharing such an informative articles more and more
    Mobile app development company in Gurgaon

    ReplyDelete
  15. Thank you so much for sharing this informative blog with us, this was really amazing and I’m really thankful to you.
    .. VIEW MORE:- Freelance Seo Expert in Delhi

    ReplyDelete
  16. Trialix Male Enhancement CBD is usually used along side the cannabinoid THC Used collectively, CBD can counteract the high” results of THC. You can too check out these merchandise to expertise benefits in the long term. You'll have seen a wildly well-liked development of merchandise boasting to contain CBD, and this probably left you questioning precisely what it's. Proceed studying for more information on CBD oil, and how it can improve your vaping expertise. Hemp Fusion sells hemp products for a wide range of benefits, together with blends for sleep, stress discount, and digestive support. Hemp derived products containing CBD can be found for buy on-line and supply straight to your door, or at retailers in the United States and over 40 international locations world wide. Purified CBD is being examined, however artisanal formulations of CBD (oils) are already out there and being used by patients. Every of all these diffusers differs in the best way that it places important oils into the air, and each has completely different benefits. CBD has a variety of medical advantages, a few of which were talked about above. Most human studies of CBD have been performed on people who have seizures, and the FDA lately approved the first CBD-based drug, Epidiolex , for rare types of epilepsy.
    https://www.smore.com/czbha-trialix-male-enhancement-canada

    ReplyDelete
  17. I can only express a word of thanks! Nothing else. Because your topic is nice, you can add knowledge. Thank you very much for sharing this information.
    Find the Interior Designers in Madhurawada

    ReplyDelete


  18. thanks for posting this blog. its really very helpful for us.
    Woodworking Tools best tools WOOD WORKERS

    ReplyDelete

  19. Nice posting..thanks.
    Ijin..info investasi lahan keluarga di San Diego Hills memorial Park bebas biaya perawatan dan kebersihan selamanya klik
    Gardening Tips Gardening Advice

    ReplyDelete

  20. You need to kill time, you need entertainment. Refer to our website. hope you get the most comfort.
    Thanks you for sharing!
    Gardening Advice Best Advice for Sports

    ReplyDelete

  21. I enjoyed over read your blog post. Your blog have nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again.
    Advice for Sports Sports

    ReplyDelete
  22. Hi All,
    I have found one of the best SEO services provider company in Delhi(www.nexcuit.com) they are providing the best SEO service in Delhi, here you can get the best professional services within your budget and as per your given timeline this company is among one of the top most companies which provide SEO services in India as of now Our Office is situated in East Delhi which is close to Nirman Vihar metro station.For more details please dial+919910326510 and get more insights concerning their charges, 100% satisfaction guaranteed.

    seo services in India

    seo company in delhi

    ReplyDelete
  23. Wow!! Really a nice Article. Thank you so much for your efforts. Definitely, it will be helpful
    for others,
    Just want to share a valuable information for Every enterprise either small or big who want to get noticed for the money making keywords on Google, which is the number one search engine in the
    internet wold help the entrepreneur in bringing new and buying customers to there doorstep.
    nexcuit is the leading and best SEO services in Delhi undoubtedly nexcuit is one of the leading
    SEO Company in Delhi that offers the best SEO solution for small and medium businesses and helps
    them achieve the first-page rank using all safe and ethical practices. To get a free quote or to
    choose the best SEO Company in Delhi,Call @ +919910326510 and get more insights related to charges and other work related terms & conditions.

    seo services in delhi
    best seo company in delhi
    seo company in delhi
    seo company in laxmi nagar

    ReplyDelete

  24. فني كهربائي بالمدينة المنورة
    يوفر لك عزيزي العميل كهربائي بالمدينة المنورة تشطيب أعمال الكهرباء لصالح الغير و نوفر تركيب لوحات الكهرباء الكاملة و أنظمة الأمان للفلل و القصور والشركات و المصانع و الصيانة و التغيير الكامل لكل ما يتعلق بأدوات الإنارة من لمبات و غيرها و الكشف عن تسربات الكهرباء المختلفة و تصليح ما يستدعى ذلك و من خلال شركتنا نوفر لعملائنا الكرام أفضل كهرباء على مستوى المدينة المنورة لما تمتلك من طاقم كبير من أفضل فني كهربائي بالمدينة المنورة ممن لديهم خبرة بالعمل لا تقل عن 15 عام
    جميعهم يقومون بأي عمل موكل لهم و بنفس الكفاءة المهنية مهما كان صغيراً أم كبيراً اتصل الآن .

    ReplyDelete
  25. Angst verschwendet nur Zeit,( máy khuếch tán tinh dầu )sie ändert nichts,máy khuếch tán tinh dầu refeshener zusätzlich nimmt sie die( máy khuếch tán tinh dầu hà nội ) Freude und macht Sie immer( máy phun sương tinh dầu )beschäftigt, ohne etwas zu erreichen.

    ReplyDelete
  26. agar aap pareshan hai rista aata hai tut jaata hai toh aap Rishta hone ki dua ko kijiye

    ReplyDelete
  27. Excellent and nice post. It will beneficial for everyone. Thanks for sharing such a wonderful post, If anyone is looking out for a best smo company in delhi then I would like to share the name of one such company which ranked among the Top social media marketing company in delhi (www.nexcuit.com) they are the social media marketing agency in delhi,here you can get the best professional services within your budget and as per your given timeline this company is among one of the top most companies which provide social media agency services in India as of now there Office is situated in East Delhi which is close to Nirman Vihar metro station. For more details please dial +919910326510 and get more insights concerning their charges, 100% satisfaction guaranteed.
    social media agency in delhi
    social media marketing company in delhi
    social media marketing companies in delhi /
    social media marketing agency in delhi
    social media marketing companies
    social media agency in laxmi nagar
    social media marketing
    social media agency
    smo company in delhi

    ReplyDelete
  28. Wow, amazing blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your website is fantastic, let alone the content!

    Best 3D Animation Service
    Best Chatbot Development Service

    ReplyDelete
  29. Download and install Vidmate App which is the best HD video downloader software available for Android. Get free latest HD movies, songs, and your favorite TV shows.

    ReplyDelete