Welcome to the Simplilearn Community

Want to join the rest of our members? Sign up right away!

Sign Up

Data science with Python ( Oct 24th - Dec 05th,2020)| Srikanth

Dear Srikanth Sir,

can you please check, i m using below code to find the distance but the below error is showing

def euclidean (x1,y1,x2,y2):
euclidean = math.sqrt((x1 - x2)**2 + (y1 - y2)**2)
return euclidean


error-
File "<ipython-input-44-b9137b35e123>", line 2
euclidean = math.sqrt((x1 - x2)**2 + (y1 - y2)**2)
^
IndentationError: expected an indented block

I think your code should be this
def euclidean (x1,y1,x2,y2):
<TAB>euclidean = math.sqrt((x1 - x2)**2 + (y1 - y2)**2)
<TAB>return euclidean

so your code will look like this
def euclidean (x1,y1,x2,y2):
euclidean = math.sqrt((x1 - x2)**2 + (y1 - y2)**2)
return euclidean
 

anu.lony

Member
Dear Srikanth Sir,

can you pls check the below error. how to remove

df.plot(kind='box',vert=False)
plt.show()
C:\Users\comac 12\anaconda3\lib\site-packages\matplotlib\cbook\__init__.py:1239: RuntimeWarning: invalid value encountered in less_equal
wiskhi = x[x <= hival]
C:\Users\comac 12\anaconda3\lib\site-packages\matplotlib\cbook\__init__.py:1246: RuntimeWarning: invalid value encountered in greater_equal
wisklo = x[x >= loval]
C:\Users\comac 12\anaconda3\lib\site-packages\matplotlib\cbook\__init__.py:1254: RuntimeWarning: invalid value encountered in less
x[x < stats['whislo']],
C:\Users\comac 12\anaconda3\lib\site-packages\matplotlib\cbook\__init__.py:1255: RuntimeWarning: invalid value encountered in greater
x[x > stats['whishi']],
 

_90819

Member
HI Srikanth Sir,

Can you please share the checklist for NYC 311 Customer service request assignment and Walmart assignment.
 
Hello Sir, I have some troubles determining which one is independent values and which one is dependent when calculating Linear Regression Model.Actually I get confused whenever i try with a new dataset(downloaded from google).Please help.

Also, Can you tell us how to use linear regression when dataset is in string form.
 

Sharada_9

Member
Hi sir,
What is Mean Absolute Error,I heard this is one of the metrics in Linear Regression but how we interpret the values of Mean Absolute Error.
for ex.
----------
Mean Absolute Error: 4.183859899002982
 
df_Brook_blocked.plot(kind='hexbin', x='Longitude', y='Latitude', gridsize=40,title = 'Blocked driveway issues con
centration across Brooklyn\n',
colormap='jet', mincnt=1, figsize=(10,6)).axis('equal')

SyntaxError: EOL while scanning string literal
Please help me
 
df_Brook_blocked.plot(kind='hexbin', x='Longitude', y='Latitude', gridsize=40,title = 'Blocked driveway issues con
centration across Brooklyn\n',
colormap='jet', mincnt=1, figsize=(10,6)).axis('equal')

SyntaxError: EOL while scanning string literal
Please help me
df_Brook_blocked.plot(kind='hexbin', x='Longitude', y='Latitude', gridsize=40,title = 'Blocked driveway issues con
centration across Brooklyn\n',
colormap='jet', mincnt=1, figsize=(10,6)).axis('equal')

SyntaxError: EOL while scanning string literal
Please help me
Correct code is:
df_Brook_blocked.plot(kind='hexbin', x='Longitude', y='Latitude', gridsize=40,
title = 'Blocked driveway issues con centration across Brooklyn\n',
colormap='jet', mincnt=1, figsize=(10,6)).axis('equal')
 

_85368

New Member
Hi Srikanth,
I'm not able to find the recording for the last class i,e; Dec12
and although I attended the class it shows session missed.
 

_79595

New Member
Hi Srikant and team
My jupyter notebook does not show any filter. In fact it was working fine but not sure if I have done anything wrong. I tried uninstalling and installed couple of time but does not work. Any help will be great.

upload_2021-1-1_12-50-52.png
 
Top