The Secret Behind Marathon

The Secret Behind marathon

Who hasn’t run a marathon yet? It’s has become an urban fashion these days to run a marathon once in a while and post it all over social media as if you do it everyday.  Well, jokes apart, Marathon has been a key sporting event across all major athletic competitions.  Starting from the Ancient Olympics in 776 BC to its modern editions, marathon has been an inseparable part of all major athletic sporting events. But did you know the secret behind its name of the sport? Well, let me explain. Marathon, is in-fact a place in Greece.  The place is significant, not due to the athletic event named after it, but due one of the greatest and bloodiest battle in the human history. Sometimes a battle is just an insignificant blip in the war, and at other times, it can shift the course of history.  The battle of Marathon that took place in 490 BCE between the citizens of Athens and the Persian empire was one such crucial battle in the annals of human history. The Battle of Marathon is significant not just because the underdogs won, but also because of the legend of courage, sacrifice and determination. Darius I, the leader of Persia, Babylon, Egypt and India, decided to become the leader of Greece as well. But the Greeks, armed with only javelins and swords, defeated the much larger and better equipped Persian army in the plains and waters off Marathon.

To Subscribe to #ScienceFactsHistory Youtube Channel , click the below link: What we remember today is the story of the messenger named Pheidippides, who brought the good news of the Greek victory to Athens, the capital of Greece.  Upon completing his 26-mile run, the legend says that Pheidippides delivered the news of the Greek victory with the word “nenikēkamen!” – which means “We Won!!!” . He then collapsed and died out of exhaustion.  Today, the word marathon means a footrace of exactly 26 miles and 385 yards. An alternate version according Herodotus says that an Athenian runner named Pheidippides was sent to run from Athens to Sparta to seek assistance before the battle.  He ran a distance of over 225 kilometres which is roughly 40 miles, arriving in Sparta the day after he left. Then, following the battle, the Athenian army marched the 25 miles or so back to Athens at a very high pace (considering the quantity of armour, and the fatigue after the battle). This was done in order to head off the Persian force sailing around Cape Sounion. They arrived back in the late afternoon, in time to see the Persian ships turn away from Athens, thus completing the Athenian victory. Whatever be the reality, the Battle of Marathon was a watershed in the Greco-Persian wars, showing the Greeks that the Persians could be beaten. The eventual Greek triumph in these wars can be seen to have begun at Marathon. Only 192 Athenians are said to have died in the battle whereas there were 6400 casualties from the Persian side. The Greeks destroyed 7 Persian ships as well. The battle showed the Greeks that they were able to win battles without the Spartans, as they had heavily relied on Sparta previously.  This victory was largely due to the Athenians, and Battle of Marathon raised Greek esteem of them.  The following two hundred years saw the rise of the Classical Greek civilisation, which has been enduringly influential in western society and so the Battle of Marathon is often seen as a pivotal moment in Mediterranean and European history. Hope you enjoyed watching this video. If you did, please do not forget to subscribe to our channel and also hit the bell icon to receive instant notification on all our future videos. #ScienceFactsHistory #YouTube #Channel This video is made using 2019-Mac Book Pro. You can buy this here –

Top 15 Animated Movies Of All Time.

Top 15.png


Today we will look at the Top 15 Animated Movies Of All Time.

Animated movies have always captured the imagination and fantasies of young and old alike. There is no doubt about the fact that some of the animated movies have stormed the box office and broken age old records set by conventional movies. Some of them have been path breaking in terms of production value, narrative style and storytelling. 

So today we are going to look at the top 15 animated movies of all time.



15. Howl’s Moving Castle – Japanese Animated Movie that came out in 2004. 

The movie was directed by Hayao Miyazaki

Howl’s Moving Castle is an animated movie about a young girl named Sophie who gets cursed by a spiteful witch who unexpectedly walks into her store. 

She encounters a self-indulgent wizard named Howl and realises that he is only one who can save her from her terrible plight. The rest of the movie is about how Sophie gets entangled with Howl and companions in their legged, walking castle.

14. Inside Out –  The 2015 American Animated Movie Directed By Pete Docter, Ronnie Del Carmen.

Inside Out was produced by Pixar Animation Studios and released by Walt Disney Pictures. 

The story is about girl , Riley Anderson, who is uprooted from her Midwestern life and who recently moves to San Francisco 

Her 5 emotions – Joy, Fear, Anger, Disgust and Sadness, which gets into a conflict on how best to navigate through the new life in the City forms,  the main premise of the plot.

It was a huge hit at the box office and was the 7th highest grossing movie of 2015.

The film received several awards, including Academy Award for Best Animated Feature Film.

13. Mary & Max – The 2009  Australian Animated Movie Directed By Adam Elliot.

Mary and Max is a 2009 Australian stop motion animated comedy-drama film written and directed by Adam Elliot. 

It was critically acclaimed and won numerous awards worldwide.

The movie is a tale of friendship between two unlikely pen pals: Mary, a lonely, eight-year-old girl living in the suburbs of Melbourne, and Max, a forty-four-year old, severely obese man living in New York.

12. Monsters, Inc. 

The 2001 American Animated Movie – Directed by Pete Docter, David Silverman (co-director)

The film centers around two monsters – James P. “Sulley” Sullivan and his one-eyed partner and best friend Mike Wazowski – employed at the titular energy-producing factory Monsters, Inc, which generates power by scaring human children.

The film won the Academy Award for Best Original Song and was nominated for three more, including for the new category: Best Animated Feature.

11.Finding Nemo (2003) 

Finding Nemo is a 2003 American Animated Film produced by Pixar Animation Studios and released by Walt Disney Pictures. 

The movie is written and directed by Andrew Stanton with co-direction by Lee Unkrich.

The story is about a timid clownfish that sets out on an adventurous journey to bring his son, who is captured in the Great Barrier Reef and later taken to Sydney.

The movie was a huge critical and commercial success.

The American Film Institute named it the 10th greatest animated film ever. 

Finding Nemo was released on May 30, 2003 the film won the Academy Award for Best Animated Feature, and was nominated in three more categories. 

Finding Nemo became the highest-grossing animated film at the time and was the second-highest-grossing film of 2003, earning a total of $871 million worldwide by the end of its initial theatrical run.

10. My Neighbour Totoro, 1988

My Neighbour Totoro is a 1988 Japanese animated fantasy film written and directed by Hayao Miyazaki.

My Neighbor Totoro was critically acclaimed and has amassed a worldwide cult following in the years after its release.

The movie is about two girls who move to the country to be near their ailing mother and their adventures with the wondrous forest spirits who live nearby.

9. Toy Story

Toy Story is an American Animated Feature directed by John Lasseter

The movie is based on the anthropomorphic concept that all toys, unknown to humans, are secretly alive, and the films focus on a diverse group of toys that feature a classic cowboy doll named Sheriff Woody and a modern spaceman action figure named Buzz Lightyear, principally voiced by Tom Hanks and Tim Allen, respectively. 

The group unexpectedly embark on adventures that challenge and change them forever.

8. Up (2003) – Directed by Pete Docter, Bob Peterson (co-director).

Up is a movie that centers around an elderly widower named Carl Fredricksen and an earnest boy named Russell. 

By tying thousands of balloons to his house, Carl sets out to fulfil his dream to see the wilds of South America and complete a promise made to his late wife, Ellie. 

The film received five Academy Award nominations, including Best Picture.

This animated film grossed over $735 million worldwide, and received universal commercial and critical acclaim.

7. Princess Mononoke -1997 Japanese Animated Movie  directed by Hayao Miyazaki.

Set in the late 13th Century Japan, Princess Mononoke is a movie with fantasy elements. 

The story follows the young Emishi prince Ashitaka’s involvement in a struggle between the gods of a forest and the humans who consume its resources.

The movie has a cult following till date and was a commercial and critical success breaking several box office records in Japan.

6. WALL·E – is  a 2008  American computer-animated science fiction film produced by Pixar Animation Studios for Walt Disney Pictures. 

It was directed and co-written by Andrew Stanton.

It follows the adventurous journey of a solitary trash compactor robot on a future, uninhabitable, deserted Earth, left to clean up garbage. 

In short, a small waste-collecting robot inadvertently embarks on a space journey that will ultimately decide the fate of mankind.

WALL-E was released in the United States on June 27, 2008. 

The film was an instant blockbuster, grossing $533.3 million worldwide over a $180 million budget, and winning the 2008 Golden Globe Award for Best Animated Feature Film, 

The film also topped Time‘s list of the “Best Movies of the Decade”, and in 2016 was voted 29th among 100 films of 21st century.

5.Toy Story 3 (2010)

Toy Story 3 is a 2010 American computer-animated comedy film produced by Pixar Animation Studios for Walt Disney Pictures. 

The director of the movie is Lee Unkrich

The plot revolves around a set of toys that are mistakenly delivered to a day-care center instead of the attic.

Toy Story 3 was the first animated film to gross over $1 billion worldwide in ticket sales, becoming the highest-grossing film of 2010 and the fourth-highest-grossing film of all time.

4.Spirited Away – The 2001 – Japanese Fantasy Animated Movie – Directed by Hayao Miyazaki, Kirk Wise.

Spirited Away tells the story of Chihiro Ogino, a moody 10-year-old girl, who tries to save her parents who were transformed into pigs due to a curse from a witch named Yubaba.

It became the most successful film in Japanese history, grossing over $361 million worldwide.

The film overtook Titanic (the top-grossing film worldwide at the time) in the Japanese box office to become the highest-grossing film in Japanese history.

Spirited Away received universal acclaim and is frequently ranked among the greatest animated films ever made.

It won the Academy Award for Best Animated Feature at the 75th Academy Awards.

In 2016, it was voted the fourth-best film of the 21st century as picked by 177 film critics from around the world, making it the highest-ranking animated film on the list.

It was also named the second “Best Film of the 21st Century So Far” in 2017 by the New York Times.

3. How to Train Your Dragon

How to Train Your Dragon is a 2010 American animated fantasy film loosely based on the 2003 book of the same name by British author Cressida Cowell.

The film was directed by Chris Sanders and Dean DeBlois 

The story takes place in a mythical Viking world where a young Viking teenager named Hiccup aspires to follow his tribe’s tradition of becoming a dragon slayer. 

After finally capturing his first dragon, and with his chance at last of gaining the tribe’s acceptance, he finds that he no longer wants to kill the dragon and instead befriends it.

The movie was a critical and commercial success.

2.  The Lion King – 1994.

The Lion King is a 1994 American animated musical film .

The Lion King was directed by Roger Allers and Rob Minkoff.

The Lion King tells the story of Simba , a young cub who is to succeed his father, Mufasa, as King of the jungle.

However, after Simba’s paternal uncle Scar murders Mufasa, Simba is manipulated into thinking he was responsible and flees into exile. 

Upon growing up, Simba returns to challenge Scar to end his tyranny and take his place in the Circle of Life as the rightful King of the Jungle.

With an initial worldwide gross of $766 million, it finished its theatrical run as the highest-grossing release of 1994 and the second-highest-grossing film of all time. 

It is also the highest-grossing traditionally animated film of all time.

Topping the list of the best animated movies of all times is the Japanese movie directed by Isao Takahata – Grave of the Fireflies.

Grave of the Fireflies., released in 1988, tells the story of a young boy and his little sister struggle to survive in Japan during World War II.

It is one of the best animated movies of all time.

Hope you enjoyed watching this video.

Please do subscribe to our channel for more such informative videos.

Please do not forget to hit the bell icon so that you get instant notification on all our future videos.

A Church Under Construction For More Than A Century – La Sagrada Familia Church – Barcelona – Spain

Spain’s La Sagrada Famila church
Spain’s La Sagrada Famila church is under under construction for the past 137 Years.

A Church Under Construction For More Than A Century – La Sagrada Familia Church  – Barcelona – Spain

Spain’s La Sagrada Famila church is under under construction for the past 137 Years.

An average of 20 years is what it takes for a pyramid to be built. But then,Spain’s La Sagrada Famila church has spent almost 7 times those years under construction. And what more, it’s still not completed.

If you have read Dan Brown’s last novel, “The Origin” , you would recognise this La Sagrada Famila church as the place where Prof. Robert Langdon gets into a tussle with his nemesis Major. General Avila.

If you look at the history of the La Sagrada Famila church, its construction began in 1882 under architect Francisco de Paula del Villar.

In 1883, when Villar resigned, Anthoni Gaudí took over as chief architect of La Sagrada Famila church transforming the project with his architectural and engineering style, combining Gothic and curvilinear Art forms. Antoni Gaudí devoted the remainder of his life to the project.

Inspire of all his efforts, he could not finish the project and he still remains buried in the crypt in the La Sagrada Famila church. At the time of his death in 1926, less than a 1/4th  of the project was complete.

The construction of the La Sagrada Famila Church solely depended on private donations and due to this, the construction progressed at a snails pace. 

The construction was interrupted by the Spanish Civil War and In July 1936, revolutionaries set fire to the crypt and broke their way into the workshop of La Sagrada Famila Church partially destroying Gaudí’s original plans, drawings and plaster models, which led to 16 years work to piece together the fragments of the master model of La Sagrada Famila church.

Construction of La Sagrada Famila church resumed to intermittent progress in the 1950s. 

Advancements in technologies such as computer aided design (CAD) and computerised numerical control (CNC) have since enabled faster progress and construction past the midpoint in 2010. 

However, some of the La Sagrada Famila Church greatest challenges remain, including the construction of ten more spires, each symbolising an important Biblical figure in the New Testament.

It is anticipated that the La Sagrada Famila Church can be completed by 2026, the centenary of Antoni Gaudí’s death.

So considering the year of starting construction of La Sagrada Famila church which happens to be 1882 and the expected year of completion to be 2026, the church would remain under construction for the over 144 Years. Which is close to 150 years for one single church. OMG!!!

Even if this is the case, over 3 million tourists and pilgrims visit La Sagrada Famila church every year. And it proudly outshines every other construction in Barcelona’s skyline. 

Currently, La Sagrada Famila Church is the largest unfinished Roman Catholic Church in Barcelona, but once completed, La Sagrada Famila Church would become the tallest church in the world.

Even if La Sagrada Famila Church is an unfinished masterpiece, art critic Rainer Zerbst said “It is probably impossible to find a church building anything like La Sagrada Famila Church in the entire history of art”, and Paul Goldberger describes it as “the most extraordinary personal interpretation of Gothic architecture since the Middle Ages”.

Thank you for watching the video and we hope you enjoyed it.

What do you think? Should a church take so long to build? How can we speed up the construction process of La Sagrada Famila Church?

Leave your comments below.

Follow #ScienceFactsHistory in Twitter – @ScienceFactsHi1 

Follow #ScienceFactsHistory in Facebook at –

Follow me on YouTube Here

Shoelace – Google’s New Social Networking App -2019

Shoelace – Google’s New Social Networking App

New Social Networking App Is Here !!!

Google was never really successful in the social media spectrum. After shutting down both Orkut and Google+ , they are betting their money on a new social networking app called #Shoelace .

The aim is to help people supercharge their social life.

Now wait. Before you jump into the app store for downloading the app , I would justice to tell you that as of now the app is only available through referral. And it is currently in its testing phase. 

Right now the app is available only in the New York City.

Shoelace is basically a mobile application that helps connect people with similar or shared interests.

This application is especially good for folks who have recently moved from one city to another and is looking for people with shared interests nearby.

Shoelace was built by a small team of innovative engineers in #Area120 ; Googles cutting edge workshop for experimental products. Google’s mission is to use technology as a medium to help people connect more effectively.

You may be very curious as to why Google choose the name “Shoelace” for this new app and rightly so.

Google says that the whole idea behind developing shoelace is to tie people together based on their interests – just like the two laces of a shoe. They are able to achieve this through activities that are effectively called loops.

Coming to the technical details – Shoelace currently supports both android devices (V.8.0 or later) and iOS(v11.0) or newer. The most important thing is that you should have an active google account to use this app.

You can watch the full video here

Hope you found this video to be useful. If you did, then please do not forget to like, share and subscribe to this channel. 

Also, please do not forget to hit the bell icon so that you receive instant notifications on all our videos in the future.

If you liked the video, please do not forget to like and subscribe the channel.

Also, please do not forget to hit the bell icon so that you get instant notification on all our future videos. 

If you enjoyed watching this video, please do Like, Subscribe and Share.

#ScienceFactsHistory #YouTube #Channel

This video is made using 2019-Mac Book Pro. You can buy this here –


Here, at #ScienceFactsHistory Channel, we bring you the best quality videos on #Science , #Technology, #History and #Facts , all rendered in #4K #High #Definition 


Disclaimer – This video is for educational purpose only. 

“Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for “fair use” for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favour of fair use.” 

THANK YOU FOR WATCHING :     #ScienceFactsHistory 


Image and Video Courtesy: 

Audio Licensing: All the AUDIO & FONTS used in this video are licensed under APPLE INC. iMOVIE FOR iOS SOFTWARE LICENSE AGREEMENT 


Follow #ScienceFactsHistory in Twitter – @ScienceFactsHi1 

Follow #ScienceFactsHistory in Facebook at –

Follow #ScienceFactsHistory in YouTube at – Science Facts History

shoelace app,shoelace google,google shoelace,social networking tips,social networking and you,social networking sites,new york,nyc,facebook,google,Area 120,Area120,area 51 meme compilation,area 51 raid,area 51 gta 5,Shoelace,loop,Connecting,Latest Technology,Twitter,google social media

Iris Plant Classification: Back-Propagation Algorithm


% ===================
% Filename: Iris_bp.m
% ===================

echo off

disp(‘ =====================================================’)
disp(‘ Iris plant classification: back-propagation algorithm’)
disp(‘ =====================================================’)

disp(‘ ============================================================================’)
disp(‘ Reference: Negnevitsky, M., “Artificial Intelligence: A Guide to Intelligent’)
disp(‘ Systems”, 3rd edn. Addison Wesley, Harlow, England, 2011. ‘)
disp(‘ pp. 332 Classification neural network with competitive learning’)
disp(‘ Source : Github- S Mathieu. Edited by Srinath Krishnamoorthy’)
disp(‘ ============================================================================’)

disp(‘ ===================================================================================’)
disp(‘ Problem: The Iris plant data set contains 3 classes, and each class is represented ‘)
disp(‘ by 50 plants. A plant is characterised by its sepal length, sepal width, ‘)
disp(‘ petal length and petal width. A three-layer back-propagation network is ‘)
disp(‘ required to classify Iris plants. ‘)
disp(‘ ===================================================================================’)

Iris_data= [5.1 3.5 1.4 0.2 % Iris-setosa
4.9 3.0 1.4 0.2 % Iris-setosa
4.7 3.2 1.3 0.2 % Iris-setosa
4.6 3.1 1.5 0.2 % Iris-setosa
5.0 3.6 1.4 0.2 % Iris-setosa
5.4 3.9 1.7 0.4 % Iris-setosa
4.6 3.4 1.4 0.3 % Iris-setosa
5.0 3.4 1.5 0.2 % Iris-setosa
4.4 2.9 1.4 0.2 % Iris-setosa
4.9 3.1 1.5 0.1 % Iris-setosa
5.4 3.7 1.5 0.2 % Iris-setosa
4.8 3.4 1.6 0.2 % Iris-setosa
4.8 3.0 1.4 0.1 % Iris-setosa
4.3 3.0 1.1 0.1 % Iris-setosa
5.8 4.0 1.2 0.2 % Iris-setosa
5.7 4.4 1.5 0.4 % Iris-setosa
5.4 3.9 1.3 0.4 % Iris-setosa
5.1 3.5 1.4 0.3 % Iris-setosa
5.7 3.8 1.7 0.3 % Iris-setosa
5.1 3.8 1.5 0.3 % Iris-setosa
5.4 3.4 1.7 0.2 % Iris-setosa
5.1 3.7 1.5 0.4 % Iris-setosa
4.6 3.6 1.0 0.2 % Iris-setosa
5.1 3.3 1.7 0.5 % Iris-setosa
4.8 3.4 1.9 0.2 % Iris-setosa
5.0 3.0 1.6 0.2 % Iris-setosa
5.0 3.4 1.6 0.4 % Iris-setosa
5.2 3.5 1.5 0.2 % Iris-setosa
5.2 3.4 1.4 0.2 % Iris-setosa
4.7 3.2 1.6 0.2 % Iris-setosa
4.8 3.1 1.6 0.2 % Iris-setosa
5.4 3.4 1.5 0.4 % Iris-setosa
5.2 4.1 1.5 0.1 % Iris-setosa
5.5 4.2 1.4 0.2 % Iris-setosa
4.9 3.1 1.5 0.1 % Iris-setosa
5.0 3.2 1.2 0.2 % Iris-setosa
5.5 3.5 1.3 0.2 % Iris-setosa
4.9 3.1 1.5 0.1 % Iris-setosa
4.4 3.0 1.3 0.2 % Iris-setosa
5.1 3.4 1.5 0.2 % Iris-setosa
5.0 3.5 1.3 0.3 % Iris-setosa
4.5 2.3 1.3 0.3 % Iris-setosa
4.4 3.2 1.3 0.2 % Iris-setosa
5.0 3.5 1.6 0.6 % Iris-setosa
5.1 3.8 1.9 0.4 % Iris-setosa
4.8 3.0 1.4 0.3 % Iris-setosa
5.1 3.8 1.6 0.2 % Iris-setosa
4.6 3.2 1.4 0.2 % Iris-setosa
5.3 3.7 1.5 0.2 % Iris-setosa
5.0 3.3 1.4 0.2 % Iris-setosa
7.0 3.2 4.7 1.4 % Iris-versicolor
6.4 3.2 4.5 1.5 % Iris-versicolor
6.9 3.1 4.9 1.5 % Iris-versicolor
5.5 2.3 4.0 1.3 % Iris-versicolor
6.5 2.8 4.6 1.5 % Iris-versicolor
5.7 2.8 4.5 1.3 % Iris-versicolor
6.3 3.3 4.7 1.6 % Iris-versicolor
4.9 2.4 3.3 1.0 % Iris-versicolor
6.6 2.9 4.6 1.3 % Iris-versicolor
5.2 2.7 3.9 1.4 % Iris-versicolor
5.0 2.0 3.5 1.0 % Iris-versicolor
5.9 3.0 4.2 1.5 % Iris-versicolor
6.0 2.2 4.0 1.0 % Iris-versicolor
6.1 2.9 4.7 1.4 % Iris-versicolor
5.6 2.9 3.6 1.3 % Iris-versicolor
6.7 3.1 4.4 1.4 % Iris-versicolor
5.6 3.0 4.5 1.5 % Iris-versicolor
5.8 2.7 4.1 1.0 % Iris-versicolor
6.2 2.2 4.5 1.5 % Iris-versicolor
5.6 2.5 3.9 1.1 % Iris-versicolor
5.9 3.2 4.8 1.8 % Iris-versicolor
6.1 2.8 4.0 1.3 % Iris-versicolor
6.3 2.5 4.9 1.5 % Iris-versicolor
6.1 2.8 4.7 1.2 % Iris-versicolor
6.4 2.9 4.3 1.3 % Iris-versicolor
6.6 3.0 4.4 1.4 % Iris-versicolor
6.8 2.8 4.8 1.4 % Iris-versicolor
6.7 3.0 5.0 1.7 % Iris-versicolor
6.0 2.9 4.5 1.5 % Iris-versicolor
5.7 2.6 3.5 1.0 % Iris-versicolor
5.5 2.4 3.8 1.1 % Iris-versicolor
5.5 2.4 3.7 1.0 % Iris-versicolor
5.8 2.7 3.9 1.2 % Iris-versicolor
6.0 2.7 5.1 1.6 % Iris-versicolor
5.4 3.0 4.5 1.5 % Iris-versicolor
6.0 3.4 4.5 1.6 % Iris-versicolor
6.7 3.1 4.7 1.5 % Iris-versicolor
6.3 2.3 4.4 1.3 % Iris-versicolor
5.6 3.0 4.1 1.3 % Iris-versicolor
5.5 2.5 4.0 1.3 % Iris-versicolor
5.5 2.6 4.4 1.2 % Iris-versicolor
6.1 3.0 4.6 1.4 % Iris-versicolor
5.8 2.6 4.0 1.2 % Iris-versicolor
5.0 2.3 3.3 1.0 % Iris-versicolor
5.6 2.7 4.2 1.3 % Iris-versicolor
5.7 3.0 4.2 1.2 % Iris-versicolor
5.7 2.9 4.2 1.3 % Iris-versicolor
6.2 2.9 4.3 1.3 % Iris-versicolor
5.1 2.5 3.0 1.1 % Iris-versicolor
5.7 2.8 4.1 1.3 % Iris-versicolor
6.3 3.3 6.0 2.5 % Iris-verginica
5.8 2.7 5.1 1.9 % Iris-verginica
7.1 3.0 5.9 2.1 % Iris-verginica
6.3 2.9 5.6 1.8 % Iris-verginica
6.5 3.0 5.8 2.2 % Iris-verginica
7.6 3.0 6.6 2.1 % Iris-verginica
4.9 2.5 4.5 1.7 % Iris-verginica
7.3 2.9 6.3 1.8 % Iris-verginica
6.7 2.5 5.8 1.8 % Iris-verginica
7.2 3.6 6.1 2.5 % Iris-verginica
6.5 3.2 5.1 2.0 % Iris-verginica
6.4 2.7 5.3 1.9 % Iris-verginica
6.8 3.0 5.5 2.1 % Iris-verginica
5.7 2.5 5.0 2.0 % Iris-verginica
5.8 2.8 5.1 2.4 % Iris-verginica
6.4 3.2 5.3 2.3 % Iris-verginica
6.5 3.0 5.5 1.8 % Iris-verginica
7.7 3.8 6.7 2.2 % Iris-verginica
7.7 2.6 6.9 2.3 % Iris-verginica
6.0 2.2 5.0 1.5 % Iris-verginica
6.9 3.2 5.7 2.3 % Iris-verginica
5.6 2.8 4.9 2.0 % Iris-verginica
7.7 2.8 6.7 2.0 % Iris-verginica
6.3 2.7 4.9 1.8 % Iris-verginica
6.7 3.3 5.7 2.1 % Iris-verginica
7.2 3.2 6.0 1.8 % Iris-verginica
6.2 2.8 4.8 1.8 % Iris-verginica
6.1 3.0 4.9 1.8 % Iris-verginica
6.4 2.8 5.6 2.1 % Iris-verginica
7.2 3.0 5.8 1.6 % Iris-verginica
7.4 2.8 6.1 1.9 % Iris-verginica
7.9 3.8 6.4 2.0 % Iris-verginica
6.4 2.8 5.6 2.2 % Iris-verginica
6.3 2.8 5.1 1.5 % Iris-verginica
6.1 2.6 5.6 1.4 % Iris-verginica
7.7 3.0 6.1 2.3 % Iris-verginica
6.3 3.4 5.6 2.4 % Iris-verginica
6.4 3.1 5.5 1.8 % Iris-verginica
6.0 3.0 4.8 1.8 % Iris-verginica
6.9 3.1 5.4 2.1 % Iris-verginica
6.7 3.1 5.6 2.4 % Iris-verginica
6.9 3.1 5.1 2.3 % Iris-verginica
5.8 2.7 5.1 1.9 % Iris-verginica
6.8 3.2 5.9 2.3 % Iris-verginica
6.7 3.3 5.7 2.5 % Iris-verginica
6.7 3.0 5.2 2.3 % Iris-verginica
6.3 2.5 5.0 1.9 % Iris-verginica
6.5 3.0 5.2 2.0 % Iris-verginica
6.2 3.4 5.4 2.3 % Iris-verginica
5.9 3.0 5.1 1.8]; % Iris-verginica


[iris_data] = Iris_data;
iris_data = (iris_data(:,[1:4]))’;

% Massaged values for the Iris plant data set

for n=1:4;

iris_target1 = [1 0 0]’; setosa=find(iris_target1);
iris_target2 = [0 1 0]’; versicolor=find(iris_target2);
iris_target3 = [0 0 1]’; verginica=find(iris_target3);

for n=1:(50-1)
iris_target1=[iris_target1 iris_target1(:,1)];
iris_target2=[iris_target2 iris_target2(:,1)];
iris_target3=[iris_target3 iris_target3(:,1)];

iris_targets = [iris_target1 iris_target2 iris_target3];

disp(‘Hit any key to randomly select input vectors to be used in training.’)
disp(‘ ‘)

p=[]; t=[]; test_p=[]; test_t=[];

for n=1:150
if rand(1)>1/3
p=[p iris_inputs(:,n)];
t=[t iris_targets(:,n)];
test_p=[test_p iris_inputs(:,n)];
test_t=[test_t iris_targets(:,n)];

[m n]=size(test_p);

disp(‘ ‘)
fprintf(1,’ The training data set contains %.0f elements.\n’,(150-n));
fprintf(1,’ The test data set contains %.0f elements.\n’,n);
disp(‘ ‘)

echo on

% Hit any key to define the network architecture.

s1=5; % Five neurons in the hidden layer
s2=3; % Three neuron in the output layer

% Hit any key to create the network, initialise its weights and biases,
% and set up training parameters.


net = newff([4.3 7.9; 2.0 4.4; 1.0 6.9; 0.1 2.5],[s1 s2],{‘logsig’ ‘purelin’},’traingdx’);; % Number of epochs between showing the progress
net.trainParam.epochs=1000; % Maximum number of epochs
net.trainParam.goal=0.001; % Performance goal; % Learning rate
net.trainParam.lr_inc=1.05; % Learning rate increase multiplier
net.trainParam.lr_dec=0.7; % Learning rate decrease multiplier; % Momentum constant

% Hit any key to train the back-propagation network.


echo off

disp(‘ ‘)
fprintf(1,’ Iris-setosa is represented by output: %.0f \n’,setosa);
fprintf(1,’ Iris-versicolor is represented by output: %.0f \n’,versicolor);
fprintf(1,’ Iris-verginica is represented by output: %.0f \n’,verginica);

disp(‘ ‘)
disp(‘ Hit any key to test the network using the test data set.’)
disp(‘ ‘)

n_setosa=0; n_versicolor=0; n_verginica=0;
error_setosa=0; error_versicolor=0; error_verginica=0; error=0;

fprintf(‘ Sepal length Sepal width Petal length Petal width Desired output Actual output Error\n’);

for i=1:n
fprintf(‘ %.1f %.1f %.1f %.1f’,test_p(1,i),test_p(2,i),test_p(3,i),test_p(4,i));
a=compet(sim(net,test_p(:,i))); a=find(a);
b=compet(test_t(:,i)); b=find(b);
if b==1
fprintf(‘ Iris-setosa ‘);
if abs(a-b)>0
fprintf(‘%.0f Yes\n’,a);
fprintf(‘%.0f No\n’,a);
elseif b==2
fprintf(‘ Iris-versicolor ‘);
if abs(a-b)>0
fprintf(‘%.0f Yes\n’,a);
fprintf(‘%.0f No\n’,a);
fprintf(‘ Iris-verginica ‘);
if abs(a-b)>0
fprintf(‘%.0f Yes\n’,a);
fprintf(‘%.0f No\n’,a);



fprintf(1,’ \n’)
fprintf(1,’ Iris-setosa recognition error: %.2f \n’,error_setosa);
fprintf(1,’ Iris-versicolor recognition error: %.2f \n’,error_versicolor);
fprintf(1,’ Iris-verginica recognition error: %.2f \n’,error_verginica);
fprintf(1,’ \n’)
fprintf(1,’ Total Iris plant recognition error: %.2f \n’,error);
fprintf(1,’ \n’)

disp(‘end of Iris_bp.m’);

% =======================================
% End of the program. Find the outputs below
% =======================================


If you have any queries, you can e-mail me at :

About me :

I m Srinath Krishnamoorthy. I m an MTech in Computer Science and Engineering from MA College of Engineering, Kothamangalam, and BTech in Information Technology from Government Engineering College, Palakkad. I m teaching Artificial Intelligence for the University of West of England (BSc Computer Science) in Male`, Maldives. My area of interests is AI, Data Analytics, Computational Intelligence and Theory of Computation.

Multilayer Neural Network – Implementing Back-Propagation Algorithm-sciLab Program

//Multi Layer neural Network BP Algogithm
//Author : Srinath Krishnamoorthy
//Date : 10-08-2017
//(c)Copyright Srinath Krishnamoorthy-2017

clear all

//Initialise the input values at Layer 1
x=[0 0
0 1
1 0
1 1];

yd=[0;1;1;0];//Desired Output at Y
ya=rand(4,1);//Actual Output

//Initialise the weights from i/p to hidden layer


//Initialise the weights from hidden to output layer

w_h1y=rand(1); //Hidden Neuron 1 to o/p neuron Y
w_h2y=rand(1); //Hidden Neuron 2 to o/p neuron Y


//Set the bias of the neurons-h1,h2 and y


//Set the thresholds for each neuron


//Error at Y


//Error gradient at h1,h2 and Y
err_grad_y =0.00;

lr=0.5;//Learning rate

net_h1=0;//Net ouput at h1
net_h2=0;//Net ouput at h2
net_y =0;//Net ouput at Y

//Actual output of h1,h2 and Y will be the sigmoid of their net outputs.


epoch=0;//Counts the number of cycles


//Sum of squared error. Will be executed till it gets below a certain range


while flag==0 do

for i=1:4
//calculate the net output of hidden neuron h1
for j=1:2

//calculate the net output of hidden neuron h2
for j=1:2
//Applying Bias and Threshold, net values at h1 and h2 will be

//Actual Output is the Sigmoid of net output at h1 and h2


//Now we need to calculate the net output at Y
//Thus actual output at Y is sigmoid of net_y

//Calculate the error at Y
//Calculate the error gradient at Y
//Now we go for weight correction

// Now we calculate the err gradient of hidden neurons

//Weight corrections for hidden neuron h1:

for j=1:2
//Adjust the threshold of the hidden neuron h1

//Weight corrections for hidden neuron h2:

for j=1:2
//Adjust the threshold of the hidden neuron h1

//Now we adjust all weights and threshold levels from hidden layer to output layer


//We reset the output values prior to next iteration
end //End of main for() loop

for k=1:4
sum_sqr_err=sum_sqr_err + [errors(k,1)^2];
//Sum of squared errors (SSE) is an useful indicator of network’s performance. As per Nagnevitsky 3rd edition page 183, ideal value is set less than or equal to 0.0010

if sum_sqr_err > 0.0010 then
disp(sum_sqr_err,’Sum of Squared Errors = ‘);
disp(errors,’The errors after this epoch is : ‘);
disp(ya,’Actual Output = ‘);
disp(yd,’Desired Output’);
disp(epoch,’end of epoch’);
//End of the do-while loop
disp(epoch,’The number of epochs required is :’,lr,’For the learning rate’)

disp(w_initial,’Initial Weights between input layer and hidden layer is : ‘);

disp(w_ih,’Final Weights between input layer and hidden layer is : ‘);

disp(w_h1y_initial,’Initial weight between hidden layer neuron h1 and output neuron Y is : ‘);

disp(w_h2y_initial,’Initial weight between hidden layer neuron h2 and output neuron Y is : ‘);

disp(w_h1y,’Final weight between hidden layer neuron h1 and output neuron Y is : ‘);

disp(w_h2y,’Final weight between hidden layer neuron h2 and output neuron Y is : ‘);

//The plot should yield a straight line

Backpropagation algorithm

Backpropagation algorithm2


If you have any queries, you can e-mail me at :

About me :

I m Srinath Krishnamoorthy. I m an MTech in Computer Science and Engineering from MA College of Engineering, Kothamangalam, and BTech in Information Technology from Government Engineering College, Palakkad. I m teaching Artificial Intelligence for the University of West of England (BSc Computer Science) in Male`, Maldives. My area of interests is AI, Data Analytics, Computational Intelligence and Theory of Computation.

Srinath Krishnamoorthy (1)Srinath Krishnamoorthy