Загрузка страницы

Decision Tree Classification Algorithm in Telugu

#decisiontree #decisiontreeclassifieralgorithm

## import dependencies
from sklearn import tree #For our Decision Tree
import pandas as pd # For our DataFrame
import pydotplus # To create our Decision Tree Graph
from IPython.display import Image # To Display a image of our graph
#Create the dataset
#create empty data frame
golf_df = pd.DataFrame()
#add outlook
golf_df['Outlook'] = ['sunny', 'sunny', 'overcast', 'rainy', 'rainy', 'rainy',
'overcast', 'sunny', 'sunny', 'rainy', 'sunny', 'overcast',
'overcast', 'rainy']
#add temperature
golf_df['Temperature'] = ['hot', 'hot', 'hot', 'mild', 'cool', 'cool', 'cool',
'mild', 'cool', 'mild', 'mild', 'mild', 'hot', 'mild']
#add humidity
golf_df['Humidity'] = ['high', 'high', 'high', 'high', 'normal', 'normal', 'normal',
'high', 'normal', 'normal', 'normal', 'high', 'normal', 'high']
#add windy
golf_df['Windy'] = ['false', 'true', 'false', 'false', 'false', 'true', 'true',
'false', 'false', 'false', 'true', 'true', 'false', 'true']
#finally add play
golf_df['Play'] = ['no', 'no', 'yes', 'yes', 'yes', 'no', 'yes', 'no', 'yes', 'yes', 'yes',
'yes', 'yes', 'no']
#Print/show the new data
print(golf_df)
# Convert categorical variable into dummy/indicator variables or (binary vairbles) essentialy 1's and 0's
# I chose the variable name one_hot_data bescause in ML one-hot is a group of bits among which the legal combinations of values are only those with a single high (1) bit and all the others low (0)

# The decision tree classifier.
clf = tree.DecisionTreeClassifier()
# Training the Decision Tree
clf_train = clf.fit(one_hot_data, golf_df['Play'])
one_hot_data = pd.get_dummies(golf_df[ ['Outlook', 'Temperature', 'Humidity', 'Windy'] ])
#print the new dummy data
one_hot_data

# Export/Print a decision tree in DOT format.
print(tree.export_graphviz(clf_train, None))

#Create Dot Data
dot_data = tree.export_graphviz(clf_train, out_file=None, feature_names=list(one_hot_data.columns.values),
class_names=['Not_Play', 'Play'], rounded=True, filled=True) #Gini decides which attribute/feature should be placed at the root node, which features will act as internal nodes or leaf nodes
#Create Graph from DOT data
graph = pydotplus.graph_from_dot_data(dot_data)
# Show graph
Image(graph.create_png())

Видео Decision Tree Classification Algorithm in Telugu канала CSE & IT Tutorials 4u
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
20 августа 2020 г. 16:31:16
00:16:26
Другие видео канала
Learning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningSQL Query #shortsindia #shortseries #telugu #trend #youtube #shorts #trend #exploreSQL Query #shortsindia #shortseries #telugu #trend #youtube #shorts #trend #exploreLets Learn Python #shorts #shortsindia #shortseries #telugu #explore #python #learningLets Learn Python #shorts #shortsindia #shortseries #telugu #explore #python #learningMachine Learning #shortsindia #shortseries #shorts #youtube #explore #teluguMachine Learning #shortsindia #shortseries #shorts #youtube #explore #teluguLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningCI/CD Pipeline #shorts #shortsindia #shortseries #explore #trend #youtube #youtubeshort #telugu #fypCI/CD Pipeline #shorts #shortsindia #shortseries #explore #trend #youtube #youtubeshort #telugu #fypJobs #shorts #youtube  #shortsindia #shortseries #motivation #programming #class #explore #trendJobs #shorts #youtube #shortsindia #shortseries #motivation #programming #class #explore #trendLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningPWC Welcome Kit #shorts #shortsindia #shortseries #telugu #youtubeshort #youtube #trend  #welcomekitPWC Welcome Kit #shorts #shortsindia #shortseries #telugu #youtubeshort #youtube #trend #welcomekitJava Working #shorts #shortseries #shortsindia #telugu #trend #explore #telugulearningJava Working #shorts #shortseries #shortsindia #telugu #trend #explore #telugulearningLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningPython Working💡#shorts #shortseries #shortsindia #shortsfeed #explore #trend #telugu #telugulearningPython Working💡#shorts #shortseries #shortsindia #shortsfeed #explore #trend #telugu #telugulearningLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningLearning Python in 20 days #shortsindia #shorts #shortseries #explore #trend #telugu #telugulearningCoding Tips 💡 #shorts #shortseries #shortsindia #shortsfeed #explore #trend #telugu #telugulearningCoding Tips 💡 #shorts #shortseries #shortsindia #shortsfeed #explore #trend #telugu #telugulearningTesting #shorts #shortsindia #shortseries #shortsfeed #explore #trend #telugu #telugulearningTesting #shorts #shortsindia #shortseries #shortsfeed #explore #trend #telugu #telugulearningHTTP Protocol #shorts #shortseries #trend #explore #learning #telugu #interview #telugulearningHTTP Protocol #shorts #shortseries #trend #explore #learning #telugu #interview #telugulearningLearn Python #shorts #shortsindia #shortseries #python #youtube #youtubeshortLearn Python #shorts #shortsindia #shortseries #python #youtube #youtubeshortLets learn Python #shorts #shortseries #shortsindia #telugu #youtube #youtubeshort #interviewLets learn Python #shorts #shortseries #shortsindia #telugu #youtube #youtubeshort #interviewOperating System Main Topics  #shorts #shortsindia #shortseries #telugu #youtubeOperating System Main Topics #shorts #shortsindia #shortseries #telugu #youtube
Яндекс.Метрика