You are on page 1of 20
www.ignousite.com £ SUNIL POONA Course Code : MCSL-223 Course Title : Computer Networks and Data Mining Lab Assignment Number : MCA_NEW(II)/L-223/Assign/2022-23 ‘Maximum Marks : 100 Xs Weightage : 30% www.ignousite.com ‘ : Last date of Submission : 31" October, 2022 (for July, 2022 session*¥ a + 15* April, 2023 (for January, 2023 session), Section 1: Computer Networks Q1: Create a UDP client on anode ni and a UDP server on a node n2. Perform the following tasks for these node ni and n2: a) Send packets to node n? from node n1 and plot the number of bytes received with respect to time at node n2. b) Show the pcap traces at node n2's WiFi interface. ¢) Show the peap traces at node nis WiFi interface. Ans. udp-elient.c /* Simple UDP client, to demonstrate use of the sockets API * Compile with: * gcc “Wall -o udp-client udp-client.c * gcc -g -Wall -o udp-client udp-client.c # to support debugging " include include include include include include tinclude finclude void handle_error(const char* s) { perror(s); exit(1); } int main(int arge, char*® argv) { int sock fd; struct sockaddr_in addr; struct hostent™ hostentp; chart endptr; unsigned int port; unsigned short port; size_tnum_to_send; size_t num_sent; if (arge I= 4) { Ignou Study Helper-Sunil Poonia Page 1 www.ignousite.com f SUNIL POONIA fprintf(stderr, “usage: %s \n", argv{0]); exit(1); } 7* convert from string to int */ portl = strtol{argv{2], &endptr, 10); if (endptr == NULL || port! == 0) handle_error("strtol); assert(port! < USHRT_MAX); port = (unsigned short}portl; re * Below, we use the C idiom for “assign to a variable * and then check its value" */ if ((hostentp = gethostbyname(argv{1)))) { herror("gethostbyname"); exit(1); } iF ((s0ck_fd = socket(AF_INET, SOCK_DGRAM, 0}} <0) handle_error("socket"); memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; memepy(&addr.sin_addr.s_addr, hostentp->h_addr_list{0, sizeof(struct in_addr); addr.sin_port = htons(port); printf("l am about to send %s to IP address %s and port %d\n",, argv{2], inet_ntoa(addr.sin_addr), atotargv(2)}; num _to_send = strlen(argvi3)); sr, rum_sent= sendt(sock fd, /*socket*/ gaa’ a arev[3}, /* buffer to send */ ‘geome num_to_send, /* number of bytes to send */ Lng 0, /* flags=0: bare-bones use case*/ (const struct sockaddr*)&addr, /* the destination */ sizeof(adci); /* sizeof the destination struct */ if (num_sent != num_to_send) { assert(num_sent <0); handle_error("sendto’ } printf("I just sent the bytes!\n"); exit(0); } Ignou Study Helper-Sunil Poonia Page 2 www.ignousite.com udp-server.c / * Simple UDP server, to demonstrate use of the sockets API * Compile with: * gcc -Wall -0 udp-server udp-server.c *or * gcc -g -Wall ~o udp-server udp-server.c # for debugging support af include include #include include include include include include #include include void handle_error(const char* s) i perror(s); exit(1); , int main(int age, char** argv) fl int sock_fd; struct sockaddr_in my_addr, my_peer_addr; char* endptr; unsigned int portl; om, unsigned short port; gs" wre ne feats char msg(1024]; Wena socklen_t addrlen; if (arge != 2) { “usage: %s \n", argv[0]); /* convert from string to int */ portl = strtol{argv{1}, &endptr, 10); if (endptr == NULL || port! == 0} handle_error("strtol"); assert(portl < USHRT_MAX); port = (unsigned short}portl; if ((s0ck_fd = socket(AF_INET, SOCK_DGRAM, 0} < 0) Touov Stupy HELPER SUNIL POONA Ignou Study Helper-Sunil Poonia Page 3 Touov Stupy HELPER SUNIL POONA www.ignousite.com handle_error("socket"); memset(&my_addr, 0, sizeof(my_addr)); my_addr.sin_family = AF_INET; my_addr.sin_addr.s_addr = INADDR_ANY; my_addr.sin_port = htons(port); if (bind(sock_fd, (struct sockaddr*)&my_addr, sizeof(struct sockaddr_in)) < 0) handle_error("bind"); while (1) { addrlen = sizeof{struct sockaddr_in}; if ((tum_received = recvfrom(sock_fd, /* socket */ msg, /* buffer */ sizeof(msg), /* size of buffer */ 0, /* flags= 0 */ /* who's sending */ (struct sockaddr*)&my_peer_addr, /* length of buffer to receive peer Info */ &addrlen)) <0) handle_error("recvfrom"); assert(addrlen == sizeof(struct sockaddr_in)); printf("! got message %.*s from host %s, src port %d\n", ntohs(my_peer_addr.sin_port)}; } s0y exit(0); | ‘et ene Q2: Create a simple network topology having two client nodes on left side and two server nodes on the right side. Connect both the client nodes with another client node n1. Similarly, connect both the server nodes to a client node n2. Also connect nodes n1 and n2, thus forming a dumbbell shape topology. Use point to point link only. Perform the following tasks using this topology: a) Install a TCP socket instance connecting either of the client node with either of the server node. b) Install TCP socket instance connecting remaining client nodes with the remaining server nodes. c) Send packets to respective clients from both the servers and monitor the traffic for both the pair and plot the number of bytes received. ) Also plot the packets received. Client-Side Code #include Ignou Study Helper-Sunil Poonia Page 4 Touov Stupy HELPER SUNIL POONA www.ignousite.com int main(){ char *ip = "127.0.0.1" int port = 5566; int sock; struct sockaddr_in addr; socklen_taddr_size; char buffer{1024); int n; sock = socket(AF_INET, SOCK_STREAM, 0}; if (sock <0 perror("[-]Socket error"); exit(1); } printf("[+]TCP server socket created.\n"); memset(8addr, \0', sizeof{addr)); addr.sin_family = AF_INET; addr.sin_port= por, addr.sin_addr.s_addr = inet_addrlip); connect(sock, (struct sockaddr*)S.addr, sizeoffaddr)}; printf("Connected to the server.\n"); brero(buffer, 1024); strepy(buffer, "HELLO, THIS IS CLIENT."); printf( "Client: %s\n", buffer); send(sock, buffer, strlen(buffer), 0); brero(butfer, 1024); recv(sock, buffer, sizeof{buffer), O}; printf("Server: s\n", buffer); close(sock); printf("Disconnected from the server.\n"}; return 0; fet Server-side Code “few gy rem include include include include include int main(){ char *ip = "127.0.0.1" int port =s 5566; int server_sock, client_sock; struct sockaddr_in server_addr, client_addr; Ignou Study Helper-Sunil Poonia Page 5 Touov Stupy HELPER SUNIL POONA www.ignousite.com socklen_t addr_size; char buffer{1024}; into; server_sock = socket(AF_INET, SOCK_STREAM, 0}; if (server_sock < O){ socket error"); printt(sITCP server socket created.\n"); memset(&server_addr, \0', sizeof(server_addr)); server_addr.sin_family = AF_INET; server_addr.sin_port = port; server_addrsin_addrs_addr = inet_addrlip); n= bind(server_sock, (struct sockaddr*)&server_addr,sizeof{servet_addr)}; if (n< oy perror("[-]Bind error"); exit(a}; } printf("[+]Bind to the port number: %d\n", port); listen(server_sock, 5); printf("tistening...\n"}; while(1)( addr_size = sizeoficlient_addr); client_sock = accept(server_sock, (struct sockaddr*)&client_addr, &addr_size}; printf("{+JClient connected.\n"); brero(buffer, 1024); recv(client_sock, buffer, sizeof{(buffer), 0); printf("Client: %s\n", buffer); brero(butfer, 1024); stropy(buffer, "HI, THIS IS SERVER. HAVE.A NICE DAY!IE); printf("Server: s\n", buffer); send(client_sock, buffer, strlen(butfer), 0); close(client_sock); printf("[+IClient disconnected.\n\n"); } return 0; } Ignou Study Helper-Sunil Poonia Page 6 . Touou Sty HeLPee £ SUNIL POONA www.ignousite.com Section 2: Data Mining Lab QL. Perform the following: a. Demonstrate data classification on dataset Customer.csv which includes creation of a csv file, reading it into WEKA and using, the WEKA explorer. ‘Ans. We load our CSV files directly in the Weka Explorer interface. This is handy if we are in a hurry and want to quickly test out an idea. We can use the iris dataset again, to practice if we do not have a CSV dataset to load. 1. Start the Weka GUI Chooser. 2. Launch the Weka Explorer by clicking the Explorer button. Pyeng a ° 3, Click the Open file... button, ono 4. Navigate to your current working directory. Change the Files of Type to CSV data files csv). Select your file and click the Open button. We can work with the data directly. We can also save our dataset in ARFF format by clicking the Save button and typing a filename. ec5e Weka Explorer fipreprocessi] Classify Cluster | Assocate | Selectatvibues | Visualize Open fie... Open URL... Open 0B. Generate... undo rier hears rove hoo Current relation Selected attribute Relation: None Attribute jone Name: None ‘Type: None Instances: None ‘Sum of weights: None Missing: None Distinct: None ‘Unique: None nate sas Meare ihe Weka ple vs | age? Ignou Study Helper-Sunil Poonia Page 7 Touoy Stvvy HELPER ww ignousite.com SUNIL POONA b, Use WEKA to implement Decision Tree (J48), Naive Bayes and Random Forest using individual datasets. ‘Ans. Weka Decision Decision Tree: Decision trees can support classification and regression problems. Decision trees are more recently referred to as Classification And Regression Trees (CART). After the tree is constructed, itis pruned in order to improve the modet’s ability to generalize to new data. Choose the decision tree algorithm: srv0y 1. Click the “Choose” button and select “REPTree” under the “trees” group. Pg a 2. Click on the name of the algorithm to review the algorithm configuration. =" weka.classifiers.trees.REPTree About Fast decision tree learner. More [capabilities batchSize (100 debug | False i) doNotCheckCapabilities | False 7 initialCount 0.0 maxDepth CO 20 minVarianceProp 0.001 noPruning (False x numDecimalPlaces 2 numFolds a seed 1 spreadinitialCount Open... Save... Ok Cancel Ignou Study Helper-Sunil Poonia Page 8 Touoy Stvvy HELPER www ignousite.com SUNIL POONA WEKA Configuration for the Naive Bayes: This is an unrealistic assumption because we expect the variables to interact and be dependent, although this assumption makes the probabilities fast and easy to calculate. Even under this unrealistic assumption, Naive Bayes has been shown to be a very effective classification algorithm. Naive Bayes calculates the posterior probability for each class and makes a prediction for the class with the highest probability. As such, it supports both binary classification and multiclass classification problems. Choose the Naive Bayes algorithm: voy 1. Click the “Choose” button and select “NalveBayes" under the "bayes" group. dg 2. Click on the name of the algorithm to review the algorithm configuration. So? ee weka.gui.GenericObjectEditor weka.classifiers.bayes.NaiveBayes About Class for a Naive Bayes classifier using estimator classes. More {Capabilities | batchsize 100 debug | False i} displayModelinOldFormat | False J doNotCheckCapabilities | False ih numDecimalPlaces 2 useKernelEstimator | False J useSupervisedDiscretization | False ” (open... } (save... [ OK | Gancet Weka Configuration for the Random Forest: Random Forest is an improvement upon bagged decision trees that disrupts the greedy splitting algorithm during tree creation so that split points can only be selected from a random subset of the input attributes. This simple change can have a big effect decreasing the similarity between the bagged trees and in turn the resulting predictions. Choose ‘the random forest algorithm: 1. Click the Choose button and select RandomForest under the trees group. Ignou Study Helper-Sunil Poonia Page 9 *, Tou Stvpy HELPER SUNIL POONA ‘www.ignousite.com 2. Click on the name of the algorithm to review the algorithm configuration, ee weka.gui.GenericObjectEditor fe weka.classifiers.trees.RandomForest a | None About Class for constructing a forest of random trees. More Capabilities bagSizePercent 100 \ batchsize 100 breakriesRandomy (Rabe) cakowomag (Fase) deg (Be doNotCheckCapabilites [Fase maxDepth 0 numDecimalPlaces 2 ‘numExecutionSlots 1 numFeatures 0 numiterations 100 oxwouobaxconpeinsansus (fe printClassifiers | False ) seed 1 storeOutOfBagPredictions | False i] L___ Oper = J ox} cancet)# Ignou Study Helper-Sunil Poonia Page 10 4 SUNIL POONIA www.ignousite.com «Illustrate and implement a java program using Naive Bayes Classification. Ans. package com.namsor.oss.samples, import com.namsor.oss.classify.bayes.ClassifyException; import com.namsor.oss.classify.bayes.NalveBayesClassifierMaplmpl; import com.namsor.oss.classify.bayes.PersistentClassifierException; import java.util. HashMap; sv0y import java.util.Map; fey import java.util logging. Level; ee import java.utillogging.Logger; oom import com.namsor.oss.classify.bayes.|Classification; import com.namsor.oss.classify.bayes.IClassificationExplained; import com.namsor.oss.classify.bayes. NalveBayesExplainerimpl; import javax script SeriptEngine; import javax.script SeriptEngineManager; * simple example of Nalve Bayes Classification (Sport / No Sport) Inspired by * http;//ai:fon.bg.ac.rs/wp-content/uploads/2015/04/ML-Classification-NaiveBayes-2014, pdf * @author IgnouStudyHelper “4 public class MainSample1 { public static final String YES = "Yes! public static final String NO = "No"; pe * Header table as per https://taylanbil.github.io/boostedNB or * http//ai.fon.bg.ac.rs/wp-content/uploads/2015/04/ML-Classification-NaiveBayes-2014.pdf “/ public static final String[] colName = { “outlook”, "temp", "humidity", "wind", "play" ‘ ps * Data table as per https://taylanbil.github.io/boostedNB or * http://ai.fon.bg.ac.rs/wp-content/uploads/2015/04/ML-Classification-NaiveBayes-2014.pdf y public static final String[]{] data = { {"'Sunny", "Hot", "High", "Weak", "No"}, {’Sunny", "Hot", "High", "Strong", "No"), "Overcast", "Hot", "High", "Weak", "Yes"), {’Rain", "Mild", "High, "Weak", "Yes"), {"'Rain", "Cool", "Normal", "Weak’,"Yes"), {"Rain", "Cool", "Normal", "Strong", "No"}, Ignou Study Helper-Sunil Poonia Page 11 www.ignousite.com f SUNIL POONIA {"Overcast", “Cool”, "Normal", "Strong", "Yes"}, {"Sunny", "Mild", "High", "Weak", "No"}, {"Sunny", "Cool", "Normal", "Weak", "Yes"}, (*Rain", "Mild", "Normal", "Weak", "Yes"}, {"Sunny", "Mild", "Normal", "Strong", "Yes"}, {"Overcast", "Mild", "High", "Strong", "Yes"}, (Overcast", "Hot", "Normal", "Weak", "Yes"), {’Rain", "Mild", 'No") public static final void main(String[] args) {, try{ ‘String[] cats = {YES, NO}; 1/ Create a new bayes classifier with string categories and string features. NaiveBayesClassifierMapimpl bayes = new NaiveBayesClassifierMapimpl("tennis", cats); // &xamples to learn from. for (int |= 0;1< data.iength; I++) { MapsString, String> features = new HashMap(); for {int j=0; j< colName.lenath - 2; j+4) { features. put(colName{j), datalil[il); } // earn ex. Category=Yes Conditions=Sunny, Cool, Normal and Weak. bayes.learn(datalilicolName.length - 1], features); MapéString, String> feature features.put{"outlook", "Sunny" features.put("temp", "Coo!" features.put{"humidity", "High"); features put("wind", "Strong"); // Shall we play given weather conditions Sunny, Cool, Rainy and Windy ? IClassification predict = bayes.classify(features, true); for (int i= 0; i< predict,getClassProbabilities().length; i++) { ‘System.out.printin("P(" + predict.getClassProbabilities()[i].getCategory() + "): predict. getClassProbabilties(i].getProbability()); } if (predict.getExplanationData() != null) ( NaiveBayesExplainerimpl explainer = new NaiveBayestxplainerimpl(); IClassificationExplained explained = explainer.explain(predict); ‘System.out.printin(explained.tostring(); ‘ScriptEngineManager scriptEngineManager = new ScriptEngineManager(); ‘ScriptEngine scriptEngine = scriptEngineManager.getEngineByName("lavaScript"}; Ignou Study Helper-Sunil Poonia Page 12 Tewov Stvby HELPER f SUNIL POONA www.ignousite.com I/ JavaScript code from String Double proba = (Double) scriptEngine.evallexplained.tostringl); System.out.printin( "Result of evaluating mathematical expressions in String = " + proba); } } catch (PersistentClassifierException ex) { Logger.getLogger(MainSample1.class.getName()) Jog(Level.SEVERE, null, ex); } catch (ClassifyException ex) { Logger.getLogger(MainSample1.class,getName()).log(Level.SEVERE, null, ex); } atch (Throwable ex) { roe Logger. getLogger{MainSampletclass getNamel) log(Level SEVERE, nll ex; dg ei ) “seems Nese , } d. Use WEKA to implement the following Clustering Algorithms: k-Means, Agglomerative and Divisive, ‘Ans. K-Means clustering using WEKA: K-means clustering is 2 simple unsupervised learning algorithm. In this, the data objects (‘n’) are grouped into @ total of ‘’ clusters, with each observation belonging to the cluster with the closest mean. It defines’ sets, one for each cluster kin (the point can be thought of as the center of a one or two-dimensional figure). The clusters are separated by a large aistance. The data is then organized into acceptable data sets and linked torthe nearest collection. If no data is pending, the first stage is more difficult to complete; in this case, an early grouping is performed. The ‘k’ new set must be recalculated as the barycenters of the clusters from the previous stage. ‘The same data set points and the nearest new sets are bound together after these ‘K’ new sets have been created. After that, a loop is created, The ‘K’ sets change their position step by step until no further changes are made as a result of this loop, Steps to be followed: ‘Step 1: In the preprocessing interface, open the Weka Explorer and load the required dataset, and we are taking the iris.arff dataset. 2 ope x Loonie (deat 9 (a) (e) (oe) le) aioe at Reuters ana Crvone optns ton Bi teesteancaram [3 sepmentcnatenge at Bi canacienses art [5 sapmentestat Squat sepvean act creat art Bi unbalanced.art SS mipemrcisat SS weamernumene art lonosehere at Ey ReutersGraintest art F-ttne te wame: [neat Fes ofType. (Am data tes (ar) x (Geoaneg (core Ignou Study Helper-Sunil Poonia Page 13 www.ignousite.com £ SUNIL POONA Step 2: Find the ‘cluster’ tab in the explorer and press the choose button to execute clustering. A dropdown list of available clustering algorithms appears as a result of ths step and selects the simple-k means algorithm. Step 3: Then, to the right of the choose icon, press the text button to bring up the popup window shown in the screenshots. We enter three for the number of clusters in this window and leave the seed value alone. The seed value is used to generate a random number that is used to make internal assignments of instances of clusters. = 5 © wetasinceneconecttor ca fy ea wera dusterers Eu Noo About ‘Simple EM (expectation maximisation) dass. More | {capaciites |} | debug (False » GsplayModeinotsrormat (False 7 doNotCheckCapabiles. [False 7 ‘maniterations | 100 ‘maximummumberofClusters minLogLikelinoodimprovementCV 1.0E-6 ‘minLogLikelinoodimprovementteratng 1.0E-6 ete rumciusters 1 numExecutionSiots 1 numFolds (10 numkMeansRuns 10 seea 100 | Open. Save. OK Cancel Step 4: One of the choices has been chosen. We must ensure that they are in the ‘cluster mode’ panel before running the clustering algorithm. The choice to use a training set is selected, and then the ‘start’ button is pressed. The screenshots below display the process and the resulting window. Ignou Study Helper-Sunil Poonia Page 14 Touoy Stvvy HELPER SUNIL POONA www.ignousite.com Cluster mode © Use training set O Suppliedtest set Set O Percentage split ” O Classes to clusters evaluation (Y) Store clusters for visualization Step 5: The centroid of each cluster is shown in the result window, along with statistics on the number and percent of instances allocated to each cluster. Each cluster centroid is represented by a mean vector. This cluster can be used to describe a cluster. Munber of clusters selected by cross validation: 4 Munber of iterations performed: 16 coastes A meee LP / ce-sntes8) [40.2 onne sepallength. mean 5.087 $.008 €.542¢mmezusce aed. deve 0.5278 0.3489 GI4Se 0.2543 sepelwidch mean 3.4le std. dev. 0.3772 petallength mean) 4.2267 L468 5.8556 5.0063 std. dev. 0.448 O.1718 0.4626 0.2462 pevalwidch mean 1.3134 0.@4be2. 14554 Base std. dev. 0.1868 0.1061 09282, 0.2182 class Iris-setosa ye 1 a Iris-versicolor 48.4125 1 L.o1e2 3.8653 Triswvirginica 2.0989 1 31,0375 19.8641 [eoval] 51.2108 7. $3 33.0557_24.7335, Step 6: Another way to grasp the characteristics of each cluster is to visualize them. To do so, right-click the result set on the result. Selecting to visualize cluster assignments from thelist column. Ignou Study Helper-Sunil Poonia Page 15 Touoy Stvvy HELPER SUNIL POONA - a www.ignousite.com © Weka Clusterer Visualize: 1:42:42 - EM (iris) | [enstance_number (um) Is) [¥:sepatiengn cum { Colour: Cluster (Nom) 13) (selectinstance Reset Clear Open Save sitter Plot iris_clustered x clusterd cluster! clustes? > Agglomerative and Divisive (Hierarchical) clustering using WEKA: Hierarchical clustering, also known as Hierarchical cluster analysis, or HCA, is an unsupervised clustering approach that includes forming groups with a top-to-bottom order. (On our hard drive, all files and folders are organized in a hierarchy. ‘The program divides objects into clusters based on their similarity, The endpoint is a collection of clusters or groups, each of which is. distinct from the others, yet the items inside each cluster are broadly similar. Steps to be followed: Step 1: Open the Weka explorer in the preprocessing interface and import the appropriate dataset; I’m using the irs.arff dataset. Ignou Study Helper-Sunil Poonia Page 16 Touoy Stvvy HELPER wwew.ignousite.com Sum Poona G Open x Lookin: (i data (a) Le) (eo) Le) DS aitine art 5 ReutersGrain-rain art Gi invoke options aiatog 5 breast-cancer at 5) segment-challenge.arf S\contactienses.amt [| segmentestar! Bi couamt 1 soybean art cpuwinendoramt [5 supermarketart Di cvat-g.am unbalanced art BB diabetes am 1B vote art 5 glass ant weathernominal att (5 rypotnyroid at (5 weatner numeric att tonosphere at 5 iris 20.0 itis art 5 tabor.art 5 ReutersComtestart ReutersCornrain.art (5 ReutersGrain-test amt FileName: iis.artt Files of Type: (Art data les (arf) Step 2: To perform clustering, go to the explorer's ‘cluster’ tab and select the select button, As a result of this step, a dropdown list of available clustering algorithms displays; pick the Hierarchical algorithm, Step 3: Then press the text button to the right of the pick icon to bring up the popup window seen in the screenshots. In this window, we input three for the number of clusters and leave the seed value alone. The seed value is used to generate a random number that is used to allocate cluster instances to each other internally. Z = Ignou Study Helper-Sunil Poonia Page 17 f SUNIL POONIA www.ignousite.com veka gu.GenencObyecthasor x wera custrers EU About ‘Simple EM (xpedaton manmasabon) cas _ ore ||capanaes de0u9 (Fate u splanlocetndiaFormat (False s cotetcrecrcapanines (False masterstons 100 IminLopLivenoccimprovementCy 106-6 rminLoguieinoodmerovementieraing 106-6 mnciaoev "106-6 rumcuters + umFotss 10 ‘numigteansRuns 10 seea 100 Step 4: One of the options has been selected. Before we execute the clustering method, we need to make sure they/ré in the ‘cluster mode’ panel. The option to employ a training set is chosen, after which the start’ button is hit. The process and the resulting window are depicted in the screenshots below. Z sey *, omens emu © Use training set O Suppliedtest set O Percentage split O Classes to clusters evaluation Nom) class. Y Store ctusters for visualization Step 5: The resulting window displays the centroid of each cluster, as well as data on the number and proportion of instances assigned to each cluster. A mean vector is used to represent each cluster centroid. A cluster can be described using this cluster. Ignou Study Helper-Sunil Poonia Page 18 Touoy Stvvy HELPER Sum POoMtA ‘www.ignousite.com Tnstances: 150 Averibues: 5 sepaliengch sepalwideh petallengeh petalwidch class ‘eet node: evaluate on training data == Clustering model (full training set) == cluster 0 (CCC 0- 020668254, 0.0:0.03254) -00813, (0.0:0.03254,0.0:0.03254 00513) 0.00982, (40.020.02778,0.0:0.02778) cluster 1 CCH 0.0€508) 0.08002 0.07344) ({ (2-0:0.06508, 1. -00066, (1.0:0.05008,1. -015€e) :0.00224,1.0:0.06798) :¢ ‘Time taken to build wodel (full training data) : 0.03 seconds = Model and evaluation on training set <== clustered Inezances ° 50 ( 338) 1 190-4 678) Step 6: Visualizing the qualities of each cluster is another approach to grasp them. Right-click the result set on the result to do so. To visualize cluster assignments are selected from the list column, _, stv i 4 Ignou Study Helper-Sunil Poonia Page 19 Touoy Stvov HELPER ‘wwvw.ignousite.com SUNIL POONA © Weks Clusterer Visualize: 11:32:41 - HierarchicalClusterer (iris) - o x Xinstance_number (Num) 7) [¥-sepaliengtn (Num) Colour: custer Nom) 17) (setectinstance Reset Clear Open Save os Plot iris_clustered clustero cluster! fey Ignou Study Helper-Sunil Poonia Page 20

You might also like