Search The Blog
Spark Windows Installation ERRORS : WINUTILS.EXE , RuntimeException
Gradient Descent, Linear Regression and running the algorithm using python
Go to this link it helps you to understand the overview gradient descent .
Code for this example can be found here
from numpy import *
# y = mx + b
# m is slope, b is y-intercept
def compute_error_for_line_given_points(b, m, points):
totalError = 0
for i in range(0, len(points)):
x = points[i, 0]
y = points[i, 1]
totalError += (y - (m * x + b)) ** 2
return totalError / float(len(points))
def step_gradient(b_current, m_current, points, learningRate):
b_gradient = 0
m_gradient = 0
N = float(len(points))
for i in range(0, len(points)):
x = points[i, 0]
y = points[i, 1]
b_gradient += -(2/N) * (y - ((m_current * x) + b_current))
m_gradient += -(2/N) * x * (y - ((m_current * x) + b_current))
new_b = b_current - (learningRate * b_gradient)
new_m = m_current - (learningRate * m_gradient)
return [new_b, new_m]
def gradient_descent_runner(points, starting_b, starting_m, learning_rate, num_iterations):
b = starting_b
m = starting_m
for i in range(num_iterations):
b, m = step_gradient(b, m, array(points), learning_rate)
return [b, m]
def run():
points = genfromtxt("data.csv", delimiter=",")
learning_rate = 0.0001
initial_b = 0 # initial y-intercept guess
initial_m = 0 # initial slope guess
num_iterations = 1000000
print "Starting gradient descent at b = {0}, m = {1}, error = {2}".format(initial_b, initial_m, compute_error_for_line_given_points(initial_b, initial_m, points))
print "Running..."
[b, m] = gradient_descent_runner(points, initial_b, initial_m, learning_rate, num_iterations)
print "After {0} iterations b = {1}, m = {2}, error = {3}".format(num_iterations, b, m, compute_error_for_line_given_points(b, m, points))
if __name__ == '__main__':
run()
For Running this program you need Python and numpy should be installed.
Install Python : Download (Install Python and set classpath/path)
Install Numpy : Download (Ater installing python follow the below steps to install Numpy.)
1: go to this website to download correct package: http://sourceforge.net/projects/numpy/files/
2: unzip the package
3: go to the unzipped folder
4: open CMD here (path of the unzipped foolder)
5: then use this command to install numpy: " python setup.py install "
Note: Installing numpy will take more time like 10mins be patient.
After completing all the above steps , the only left is download the complete program , data.csv file from Github, then go to the download folder in cmd prompt and give command as
1: python gradient_descent_example.py
Please check the screen shots .
![]() |
Gradient Descent, Linear Regression and running the algorithm using python |
Installing Numpy |
Create a project in Eclipse
- Choose File → New → Java Project from the Eclipse menu bar
- Enter the Project name as "com.[company or Institute name].[Module or project name] " , then click next and next
- Finish
Students going to USA who are not worth : India
People who are sent back dont have that abilities to study in USA thats why ther are going back. I have immigration statement of one student how she talked to an immigration officer makes us feel sick.
The students who are coming to US for pursuing MS should need to have some responsibilites , capabilites , desire to learn etc..
Before 15 years there is a value for engineering what is the suituation now,from every home there is an engineering student and there is no job for all of them. Likewise from every house there is a MS student who is studying in USA(same suituation is created in USA if you come to USA there is no gaurantee of job only people who train and place you will be benefitted), which is very worst suituation created by establishing so many engineering colleges by our government and giving free education to all students who are not worth capable of doing that.
Who are coming to USA?
Those who were having desire to learn , pursue their goals,willing to withstand with the foeign culture etc. But in reality only 10% of the students coming to USA is having above said features,rest of them are not worth to stay in USA. This is because of students who completes B.Tech or degree dunno what to do ? How to get job ? What to do in future ? Dunno their goals ?
So, so many people are coming to US after B.Tech without even trying for jobs or thinking what to do. The living style or our education system has become like a series activities to perform in interval of time.
How students are coming to USA ?
1. Go to some consultants and tell their goal to go for USA
2. They have all predefined data, then they will select some universities and send these students to these universities.
Students who are coming here dunno what to do , how to do , where to go , they are not trained by these consultants how to behave in foreign . They blindly come and risk everyone life.
Who done the mistakes ?
indirectly everyon has done the mistakes, right from Indian govt to USA govt, Parents to children, Prestitutes , Consulting firms . What everyone seeing in these only Money Money Money...... But everyone forgets one thing before earning you shoulf be perfect .
Dont ask me what they are doing ? plz ....
Hope my article can help you think in other way.
This post is completely for awareness , not for any disputes. If you have any objection please send mail.
THE RICHEST DIVINITIES OF INDIA
DINESH VORA
Investigators plan to pry open the final vault hidden
deep under the centuries-old
Sree Padmanabhaswamy temple as police guarded
round the clock the shrine where billions of dollars
worth of treasure has been discovered.
Over the last week a seven-member team of investigators
has broken into five of the six secret subterranean vaults piled high with jewels that have laid
untouched for hundreds of years.
[1]
PADMANABHASWAMY KSHETRAM
The temple that houses a sleeping idol of Lord Vishnu is the richest temple in the world. Treasure worth Rs 100,000 crore ($ 20,000,000,000) or 20 billiion dollars was recently found in secret chambers on temple land. Golden crowns, 17 kg of gold coins, 18 ft long golden necklace weighing 2.5 kg, gold ropes, sack full of diamonds, thousands of pieces of antique jewellery, and golden vessels were some of the treasures unearthed during the weekend.
Rs. 1 Crore =
Rs. 1,00,00,000 =
Rs. 10,000,000 =
Rs. 10 Million =
$ 200,000 (At very appx. Rs. 50 = $1)
The second most visited temple in the country after
Tirupathi Balaji, Vaishno Devi has
an annual income of Rs 500 crore.
Managed by the Shri Mata Vaishno Devi Shrine Board,
popularly called the Shrine Board,
the temple has a daily income of Rs 40 crore.
Situated in the heart of Mumbai, the second
richest temple in the state of Maharastra
has an annual income of Rs 46 crore
and has Rs 125 crore in fixed deposits.
The temple known for its famous devotees
receives around
Rs 10-15 crores as donations
every year.
As per the financial records of Shree Siddhivinayak
Ganapati Temple Trust, the assets of the temple stood
at approximately Rs.140 crore for the year ended
March 2009.
Run by a nine-member committee under the Kerala Dewaswom Board, the most famous Lord Krishna temple in South India makes Rs. 2.5 crore annually and has approximately Rs. 125 crore in fixed deposits.
The most sought after puja at the temple, the Udayaasthamana Puja, has a wait list till the year 2049.
The dawn to dusk Puja costs Rs 50,000.
Improve your eyesight
We all know how important it is to keep our bodies fit by doing things like going to the gym, jogging, and swimming. But, did you know that you can exercise your eyes as well?
Eye exercising will keep your eyes healthy and help minimize eyestrain. Here are some easy to follow steps and tips to exercise your eyes and keep them healthy!
- Palming Exercise - Sit comfortably on a chair. Rub your hands together until they feel warm. Close your eyes and cover them lightly with your cupped palms. Avoid applying pressure on your eyeballs. Place your palms so that the nose remains uncovered, and the eyes remain behind the slight hollow of the palms. Make sure that no light rays enter the eyes, and leave no gaps between fingers or between the edge of the palms and the nose. You may still see other lingering traces of colors. Imagine deep blackness and focus on the blackness. Take deep breaths slowly and evenly, while thinking of some happy incident; or visualize a distant scene. After your eyes see nothing but blackness, remove your palms from your eyes. Repeat the palming for 3 minutes or more.
- Close your eyes tightly for 3-5 seconds, then open them for 3-5 seconds. Repeat this 7 or 8 times.
- Close your eyes and massage them with circular movements of your fingers for 1-2 minutes. Make sure you press very lightly; otherwise, you could hurt your eyes.
- Press three fingers of each hand against your upper eyelids, and hold them there for 1-2 seconds, then release. Repeat 5 times.
- Sit and relax. Roll your eyes clockwise, then counter-clockwise. Repeat 5 times, and blink in between each time.
- Focusing Exercises – Sit about 6 inches (150 mm) from the window. Make a mark on the glass at your eye level (a small sticker, black or red, would be perfect). Look through this mark and focus on something far away for 10-15 seconds; then focus on the mark again.
- Hold a pencil in front of you at arm's length. Move your arm slowly to your nose, and follow the pencil with your eyes until you can keep it in focus. Repeat 10 times.
- Look in front of you at the opposite wall and pretend that you are writing with your eyes, without turning your head. It may seem difficult at first, but with a bit of practice it is really fun. The bigger the letters, the better the effect.
- Imagine that you are standing in front of a really big clock. Look at the middle of the clock. Then look at any hour mark, without turning your head. Look back at the center. Then look at another hour mark. Do this at least 12 times. You can also do this exercise with your eyes closed.
- Focus on a distant object (over 150 feet or 50 m away) for several seconds and slowly refocus your eyes on a nearby object (less than 30 feet or 10 m away) that's in the same direction. Focus for several seconds and go back to the distant object. Do this 5 times.
- Focus on an object in the distance (as far as possible) with a low contrasting background. Do this for a few minutes every half hour or so. This does not improve your vision, nor does any other technique. It can, however, maintain your best eyesight level during the day and prevent significant further vision deterioration.
- Make up and down eye movements starting from up to to down. Do this 8 times. Then do the side to side eye movement, starting from left to right. Repeat this 8 times. Make sure not to add pressure to your eyes! It only worsen your vision!
Tips
- It's more important to do the exercises regularly than to do them for a long time. Even 30-60 seconds of eye movement every hour is very helpful. For example, when your computer takes its sweet time to do something, most people just stare at the poor thing and waste the time, but you can make a few circles with your eyes. Even the first day you do this, you should notice that, when you finish working, your eyes aren't as tired as usual.
- Taking short breaks from near work (e.g. staring at a computer monitor) to stare out to the distance also relieves some strain.
- Palming is a good method to help your eyes feel better. You close your eyes and put your palms over them, this will rest your eyes.
- Blink the eyes many times.
- Splash your eyes with cold water repeatedly when feasible, and especially when your eyes are strained.
WRITE IN INDIAN LANGUAGES WITH NHM WRITER
WRITE IN INDIAN LANGUAGES WITH NHM WRITER One application that helps you write in any language, any encoding, any keyboard layout. Write in 10 Indian languages such as Assamese, Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Punjabi, Tamil & Telugu. MD5 : bc5eaf7711341fa542f5a9613c28948c
and much more. For users who have NHM Writer already installed, please follow the steps below to install the new version.
-- |