Linear Regression in Python using Jupyter Notebooks!
This is a full walk through tutorial on linear regression with Python! We will use Jupyter Notebooks and a real, interesting business use case - predicting air quality in Bangor Maine! The data consists of columns of the air components (O, N, Ar, SO2, etc.) in parts per million and we will see if we can use some machine learning to predict SO2 (sulfur dioxide levels) based on this data.
Contents:
1) load libraries
2) load the data set from a local csv file using the r switch for text links.
3)Look at the data and plot a histogram for the dependent (target) variable - SO2.
4) Get the correlations for all of the columns and then dive into any inter correlations on the highly correlated columns (potential predictors).
5) Create a test and training set based on this data (75% train, 25% test).
6) Create the linear regression model and get predictions on the data.
7) plot the predictions and score them (our score is about 70% on this data).
8) print the predictions.
9) place the predictors, actual data and predicted data together in a data frame for easy comparison.
10) Write the data frame to a csv using the pandas to_csv function.
There are lots of great tips in the video to help you avoid pitfalls and errors. I also chose to dfo this in Jupyter Notebooks to encourage great documentation of code. Jupyter notebooks just makes great documentation almost effortless and great documentation is something that will always carry you far in data science and / or analytics or any similar field with coding and programming.
This python tutorial is a complete walk through and was actually used as a part of an adhoc request to determine random days of low sales and what was causing that in Maine.
This was a really interesting usage of data science, linear regression, analytics, machine learning and python to see if we could predict air quality levels. Data science can be very interesting and fun!
Thanks for watching. Please take a moment to like, subscribe and share!
Thanks again and God bless!
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Linear Regression in Python using Jupyter Notebooks!», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.