4.AIML - To Extract Features From Given Data Set and Establish Training Data
4.AIML - To Extract Features From Given Data Set and Establish Training Data
Practical No. 04
Aim: To extract features from given data set and establish training data.
Objectives:
Problem Definition:-
The Dataset given below is the mobile phone sales data with details of each mobile phone
w.r.t their brand. The problem is that how to decide mobile phone price considering factors
affecting like Battery, Ram, and Camera etc. To solve this problem following is the collected sales
data of mobile phones of various companies.
Input data
1. Dataset given in form of .csv file (comma separated values)
Program:-
import pandas as pd
import fsspec
import numpyas np
from sklearn.feature_selectionimport SelectKBest
from sklearn.feature_selectionimport chi2
data = pd.read_csv("E://test1.csv")
X=data.iloc[:,1:20]
y = data.iloc[:,-1]
print(X,y)
Output:-
Specs Score
12 px_width 852.914979
13 ram 562.837207
11 px_height 46.347162
8 mobile_wt 42.328627
4 fc 15.793117
10 pc 11.148155
6 int_memory 1.372252
2 clock_speed 1.052762
15 sc_w 0.809077
16 talk_time 0.760553
Conclusion:-
From the above data we understand these 10 features are more effective while selecting the
price of mobile phones.
From the above output it is concluded that the camera pixel width affect more on price
because camera is the major costly part in mobile phones.