آموزش پایتون برای Data Science

2 دقیقه مطالعه

در اینجا فرض من اینه که شما از سیستم‌عامل‌ لینوکس ترجیحا Debian و یا Ubuntu استفاده می کنین ولی برای کسی که بخواد با ویندوز کار کنه یکم سرچ با گوگل می تونه مفید باشه.

پایتون برای Data Science

یکی از ویژگی‌های خوب پایتون اینه که برای خیلی از زمینه‌های تحقیقاتی براش یه عالمه کتابخونه پیدا می‌شه. تو اینجا یه سری کتابخونه برای کارهای مربوط به Data Science (و همین‌طور مباحثی اختصاصی‌تر مانند محاسبات عددی، آمار و احتمال) هستن رو می خواهیم با هم بررسی کنیم و تعدادی از فانکشنالیتی های مربوط به اون‌ها رو هم با تعدادی مثال ببینیم.

برای شروع کار اول باید ابزاری که باهاش می‌خواهیم شروع به یادگیری بکنیم رو انتخاب کنیم. در حالت کلی ابزار و محیط‌های دولوپمنت زیادی برای پایتون وجود داره که چند تا از مهمترین اونا عبارت‌اند از

  • IntelliJ IDEA
  • Pycharm
  • Spyder
  • Jupyter.

در مورد دوتای اول می تونم بگم که اونا محیط‌های دولوپمنت خیلی کاملی برای پایتون هستن و توی کارایی که می‌خواهیم نرم‌ازار بنویسیم توصیه اولیه به استفاده از اون‌هاست ولی این دو تا ابزار برای مواقعی که می‌خواهیم یه سری داده رو به صورت ماتریس و بردار در برناممون داشته باشیم چندان مناسب نیستن. چون در اغلب مواردی که یه نفر می‌خواد با داده به صورت تحلیلی کار کنه و یه سری از روش‌های جبری و آماری رو روی ماتریس‌هایی که از داده‌های خونده‌شده ران کنه توی محیط‌هایی مثل پایچارم ممکنه دچار مشکلات زیادی بشه. در واقع ران کردن بعضی از متد‌ها روی ماتریس‌هایی با ابعاد بالا ممکنه خیلی هزینه‌ی زمانی و حافظه‌ای زیادی بخواد و مطلوب باشه که فقط ما یه بار بخشی از کد رو که مربوط به این متده هستش رو ران کنیم و نتیجهشو تا وقتی که بخواهیم توی محیط کارمون با داشته باشیم. یه راه اینکار اینه که محیط ما به صورت سلول‌هایی حافظه‌دار باشه که ما تصمیم میگیریم کدوم سلول ران بشه و مدیریت حافظه‌ی مصرفی هم تا حد زیادی دست خودمون باشه.

یه ابزار که خیلی خوب می تونه یه محیط سلولی به ما بده که بتونیم کدمون رو روش اجرا کنیم یه کتابخونه‌ی پایتونه به نام Jupyter (البته این ابزار غیر از پایتون حدود ۵۰ تا زبون برنامه‌نویسی معروف دیگرم پشتیبانی می‌کنه) هست که نسبتا خیلی ساده میشه‌ از اون به عنوان یه محیط تحلیلی و آماری استفاده کرد.

نصب

برای نصب ژوپیتر می‌تونین از هرکدوم از دستورات زیر استفاده کنین:

توی ترمینال Debian و با استفاده از pip

sudo pip install jupyter

و یا

sudo pip3 install jupyter

استفاده

برای شروع کار ابتدا یک پوشه با نام دلخواه خود ایجاد کنید مثلا

cd /home/$USER/Desktop
mkdir -p jupyter_ds
cd jupyter_ds

بعد از تغییر دادن دیرکتوری و رفتن به پوشه‌ی مورد نظر (در اینجا jupyter_ds) با دستور زیر می تونین کار با ژوپیتر رو برای اولین‌ بار شروع کنین.

jupyter notebook password

که نتیجش درخواست سیستم برای درج یک کلمه‌ی عبور خواهد بود برای محیط ژوپیتر خودتون. تنظیم رمز عبور

در نسخه‌‌ی جدید ژوپیتر رمزگذاری برای ژوپیتر اجباری شده و برای همین در اولین اجرا شما باید از دستور بالا استفاده کنین ولی بعد از تنظیم کلمه‌ی عبور فقط کافیه از

jupyter notebook 

استفاده کنین.

بعد از درج رمز عبور دیگه تقریبا همه چیز برای کار کردن با ژوپیتر آمادس. بعد از شروع به کار کردن، ژوپیتر در اینجا قابل دسترسی خواهد بود. شروع

بعد از رفتن درسترسی به آدرس انتشار ژوپیتر شما می‌تونین اولین داشبورد (بهش نوت بوک هم میگن) رو بسازین و شروع کنین به نوشتن کد پایتون، تصاویر آورده‌شده در زیر هم یه سری مثالن برای شروع کار با ژوپیتر: ایجاد یک داشبورد نام‌گذاری داشبورد نوشتن کد پایتون در یک داشبورد ژوپیتر

نظر ها

Hi, i think that i saw you visited my site thus i came to “return the favor”.I am attempting to find things to improve my website!I suppose its ok to use some of your ideas!!

My spouse and I stumbled over here different page and thought I should check things out.

I like what I see so now i am following you. Look forward to looking at your web page again.

Your style is unique compared to other folks I have read stuff from. Thank you for posting when you’ve got the opportunity, Guess I’ll just book mark this page.

With havin so much written content do you ever run into any problems of plagorism or copyright infringement? My blog has a lot of completely unique content I’ve either created myself or outsourced but it looks like a lot of it is popping it up all over the internet without my authorization. Do you know any solutions to help stop content from being ripped off? I’d truly appreciate it.

After checking out a few of the articles on your website, I truly like your way of blogging. I book-marked it to my bookmark webpage list and will be checking back in the near future. Please visit my website too and let me know your opinion.

I loved as much as you will receive carried out right here. The sketch is attractive, your authored material stylish. nonetheless, you command get bought an impatience over that you wish be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly very often inside case you shield this hike.

I was curious if you ever considered changing the page layout of your blog? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having one or 2 images. Maybe you could space it out better?

It is perfect time to make a few plans for the long run and it’s time to be happy. I have learn this post and if I may just I want to counsel you some fascinating things or advice. Perhaps you can write subsequent articles regarding this article. I want to learn more issues about it!

Thanks for a marvelous posting! I seriously enjoyed reading it, you happen to be a great author. I will be sure to bookmark your blog and will often come back later in life. I want to encourage that you continue your great job, have a nice evening!

Nice weblog right here! Additionally your website a lot up fast! What web host are you the usage of? Can I am getting your associate link for your host? I want my site loaded up as fast as yours lol

Excellent post. I was checking continuously this blog and I am impressed! Very useful info particularly the remaining phase : ) I handle such information much. I was looking for this particular information for a long time.

Thank you and best of luck.

My partner and I stumbled over here from a different website and thought I might as well check things out. I like what I see so i am just following you. Look forward to looking into your web page again.

What’s Going down i’m new to this, I stumbled upon this I’ve discovered It absolutely helpful and it has helped me out loads. I hope to contribute & assist different users like its helped me. Great job.

Pretty section of content. I just stumbled upon your blog and in accession capital to assert that I acquire actually enjoyed account your blog posts. Anyway I’ll be subscribing to your feeds and even I achievement you access consistently fast.

I was suggested this website by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You’re amazing! Thanks!

When I initially commented I appear to have clicked the -Notify me when new comments are added- checkbox and now every time a comment is added I receive 4 emails with the exact same comment. There has to be a way you are able to remove me from that service? Appreciate it!

When some one searches for his required thing, thus he/she desires to be available that in detail, so that thing is maintained over here.

Attractive component of content. I just stumbled upon your weblog and in accession capital to say that I acquire in fact enjoyed account your weblog posts. Anyway I’ll be subscribing for your feeds or even I achievement you get admission to persistently rapidly.

Thanks for your personal marvelous posting! I definitely enjoyed reading it, you are a great author.I will be sure to bookmark your blog and definitely will come back later in life. I want to encourage you continue your great writing, have a nice weekend!

You can definitely see your enthusiasm within the article you write. The sector hopes for even more passionate writers like you who aren’t afraid to say how they believe.

All the time go after your heart.

Hello! I just wanted to ask if you ever have any issues with hackers? My last blog (wordpress) was hacked and I ended up losing months of hard work due to no back up. Do you have any solutions to stop hackers?

We’re a group of volunteers and opening a new scheme in our community. Your website provided us with valuable info to work on. You’ve done an impressive job and our entire community will be grateful to you.

Hello! Do you know if they make any plugins to help with SEO? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good gains. If you know of any please share. Many thanks!

Hey! Do you know if they make any plugins to protect against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any tips?

Thank you, I’ve just been searching for info approximately this topic for ages and yours is the greatest I have discovered till now. But, what about the bottom line? Are you certain concerning the source?

May I simply say what a comfort to find someone who actually knows what they are talking about on the internet.

You actually understand how to bring a problem to light and make it important. More and more people should check this out and understand this side of your story. I was surprised that you aren’t more popular because you definitely possess the gift.

I’ve been exploring for a little bit for any high-quality articles or weblog posts in this sort of area . Exploring in Yahoo I eventually stumbled upon this website. Studying this info So i am satisfied to show that I have a very good uncanny feeling I found out exactly what I needed. I so much no doubt will make certain to don?t omit this web site and give it a look on a relentless basis.

Good day! Do you know if they make any plugins to protect against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any tips?

Valuable information. Fortunate me I discovered your site by accident, and I’m surprised why this coincidence did not took place earlier! I bookmarked it.

Oh my goodness! Impressive article dude! Thank you so much, However I am going through issues with your RSS.

I don’t know why I can’t join it. Is there anybody else getting similar RSS issues? Anybody who knows the answer can you kindly respond? Thanks!!

I have been surfing on-line more than 3 hours today, yet I by no means discovered any attention-grabbing article like yours. It’s pretty worth enough for me. In my view, if all webmasters and bloggers made just right content as you probably did, the web will be a lot more helpful than ever before.

This is very interesting, You are a very skilled blogger. I’ve joined your feed and look forward to seeking more of your wonderful post. Also, I’ve shared your web site in my social networks!

Hi! I know this is kind of off-topic but I needed to ask. Does running a well-established website such as yours take a large amount of work? I am brand new to operating a blog however I do write in my diary every day. I’d like to start a blog so I can easily share my personal experience and thoughts online. Please let me know if you have any kind of recommendations or tips for new aspiring blog owners. Thankyou!

I am really enjoying the theme/design of your blog. Do you ever run into any web browser compatibility issues?

A few of my blog readers have complained about my site not working correctly in Explorer but looks great in Chrome. Do you have any recommendations to help fix this problem?

Greetings from Florida! I’m bored to death at work so I decided to browse your site on my iphone during lunch break. I really like the knowledge you provide here and can’t wait to take a look when I get home.

I’m shocked at how fast your blog loaded on my mobile .. I’m not even using WIFI, just 3G .. Anyways, excellent blog!

Wonderful blog! I found it while surfing around on Yahoo News. Do you have any tips on how to get listed in Yahoo News?

I’ve been trying for a while but I never seem to get there!

Many thanks

A fascinating discussion is worth comment. I do think that you should write more on this subject matter, it may not be a taboo matter but typically folks don’t talk about these issues. To the next! All the best!!

Hey There. I discovered your blog the use of msn. That is an extremely neatly written article. I will make sure to bookmark it and come back to learn extra of your helpful info. Thank you for the post. I will definitely return.

I feel that is among the such a lot vital information for me. And i’m satisfied studying your article. But want to remark on few basic issues, The web site style is ideal, the articles is actually excellent : D. Just right task, cheers

Good day! I could have sworn I’ve been to this website before but after browsing through some of the post I realized it’s new to me. Anyhow, I’m definitely delighted I found it and I’ll be book-marking and checking back often!

Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

Please let me know if you’re looking for a article writer for your blog. You have some really good articles and I feel I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some content for your blog in exchange for a link back to mine. Please blast me an email if interested.

Many thanks!

You actually make it seem so easy with your presentation but I find this topic to be really something that I think I would never understand. It seems too complex and very broad for me. I am looking forward for your next post, I’ll try to get the hang of it!

Descargar facebook I am actually pleased to read this weblog posts which contains tons of useful facts, thanks for providing these statistics. Descargar facebook

I am not sure where you’re getting your info, but great topic.

I needs to spend some time learning much more or understanding more. Thanks for magnificent information I was looking for this information for my mission.

I’m gone to convey my little brother, that he should also pay a quick visit this weblog on regular basis to obtain updated from hottest reports.

Very good blog you have here but I was curious about if you knew of any community forums that cover the same topics discussed in this article? I’d really love to be a part of community where I can get feedback from other experienced people that share the same interest. If you have any suggestions, please let me know.

Thank you!

Hi! I just wanted to ask if you ever have any trouble with hackers? My last blog (wordpress) was hacked and I ended up losing a few months of hard work due to no back up. Do you have any solutions to protect against hackers?

Descargar facebook http://twitter.com/descargar_hq descargar facebook Very descriptive blog, I enjoyed that bit. Will there be a part 2? Descargar facebook http://twitter.com/descargar_hq descargar facebook

Quest bars cheap fitnesstipsnew1 quest bars cheap 516999410492780544 quest bars cheap I blog often and I genuinely thank you for your content. Your article has really peaked my interest. I will book mark your site and keep checking for new information about once a week. I subscribed to your Feed as well. Quest bars cheap fitnesstipsnew1 quest bars cheap 516999410492780544 quest bars cheap

It is appropriate time to make some plans for the future and it’s time to be happy. I’ve read this put up and if I may just I wish to suggest you some interesting issues or advice. Perhaps you can write subsequent articles relating to this article. I wish to read even more things about it!

I blog frequently and I genuinely appreciate your content. The article has really peaked my interest. I will bookmark your blog and keep checking for new details about once a week. I subscribed to your RSS feed as well.

I do consider all the ideas you have presented for your post.

They’re very convincing and can definitely work. Nonetheless, the posts are very quick for newbies. Could you please lengthen them a bit from subsequent time?

Thank you for the post.

نظر خود را بنویسید

ایمیل شما منتشر نخواهد شد. فیلد های الزامی *

در حال بارگذاری...