So: with linear regression (aka simple linear regression) we have one feature which we are using to predict a dependent value (for example number of rooms as a predictor of house price). With multivariate regression (aka multiple linear regression) we simply have multiple features which could be used to predict that dependent value (for example... Continue Reading →

Polynomial regression is a considered a special case of linear regression where higher order powers (x2, x3, etc.) of an independent variable are included. It's appropriate where your data may best be fitted to some sort of curve rather than a simple straight line. The polynomial module of numpy is easily used to explore fitting the best... Continue Reading →

Typically we have 2 sets of values and we want to find out if these 2 sets of values are related, and if so how, and by how much? Could height be indicative of weight? Could hours of practice be related to how many errors are made in a mathematical test paper? Co-variance is a... Continue Reading →

I have a "real" assignment (for work as opposed to study) to do some data visualizations using maps. It's been a journey of over a week to get to the place where I'm ready to start, and the journey has had some educational detours along the way that I thought I'd share. Naturally, because I'm... Continue Reading →

A big thanks to ujubee.com for challenging me to create a polar bar chart last week - I hadn't done one of these before, but the matplotlib polar_bar_demo documentation was most excellent - and you can see from the test sample below that the results are very pretty! If you're interested in a bit more... Continue Reading →

15 buildings, 35 aspects per building, each weighted according to importance, and then condensed into 6 key categories, with colour coding depending on how the results tumble out. What helped me get the final result? Pandas to import data from spreadsheet extract only the data I need manipulate it so we end up with... Continue Reading →

The joys of real world data... I received a file today with building floors: 1st, 2nd, 3rd, all the way to 22nd... Regular sorting quickly got me nowhere, with results that started 10th, 11th, 12th, 13th, 14th, 15th, 16th, 17th, 18th, 19th, 1st, 22nd, etc. This led to my discovery of the most marvellous natsort... Continue Reading →

Matplotlib gallery - the possibilities seem near endless... A great starting point when trying to figure out how to get the result you imagine!

I had quite a few false starts with matplotlib this week before I got going... I should know better by now, but I still keep on thinking I can just go crashing in and extrapolate on what I know and it might work - time-WASTING behaviour! If I may offer some tips (which I trust... Continue Reading →