Skip to main content

Posts

What Frequency Tables for categorical values in dataframe ?

Frequency tables are tables that shows how frequently various categories of categorical variables occur in data and how many different categories are there and which are those categories,  it is also useful for classification to find the frequency of each category of label variable(column) .  this help us to separate helpful categories from not so helpful categories.  suppose some category in categorical variable occurs just ones or twice  then it is not going to be helpful from statistical point of view . Lets see how to make frequency tables--- first i have downloaded auto_prices data set ,then i have taken out come categorical columns and created list of those columns ,this list along with dataset is passed to the count unique function . that function simply loop through each column in the list and  counts  number of times each unique value occurs in  column and finally prints the same. above code gives following frequency table--- Examining classe...

Data visualization for classification

The aim of  Data visualization is some what different for classification as compared to the regression , in classification we have to find how different attributes (numeric and categorical ) are related to  categorical labels or we can say with different categories  of labels. >>following are some techniques used for Data visualization for classification ---- Visualize class separation using numeric feature - ---                                                                             goal of visualizing data for classification is to understand which feature is useful for class separation.                                                   ...

Learn which Are The Best Plots For Data Visualization in just 5 min ?

Python is a cool language when it comes to machine learning. Data visualization is the keys to building best machine learning model. And Without  data visualization machine learning is just a waste of time  data visualization helps us understand data and relationships between features. Here we will learn which are the best plots to visualize what type of data. Data is basically of two two types--- 1.Numeric 2.Categorical  1. Draw distribution for single feature -- If the feature is of categorical type then its better to use bar plots. in diagram given below you can see the different company names that produces automobiles these company names are categorical and graph shows which company manufactured how many autos    If the feature is  numerical its better to draw histogram with bins. in diagram below you might see that engine size is plotted against number of autos . notice that engine size is a numerical feature if the feature is numerical then there are ...