Posts

Image
 CROSSTABLES IN R | DATA VISUALIZATION A crosstable, also known as a contingency table, is a table showing the frequency of occurrences of certain events or values within different groups or categories. In R, the table() function can be used to create a crosstable. For example, if you have a categorical variable "Gender" and another categorical variable "Age group", you can create a crosstable showing the number of occurrences of each age group for each gender by running: # Create example data Gender <- sample ( c ( "Male" , "Female" ) , 100 , replace = TRUE ) Age <- sample ( 18 : 80 , 100 , replace = TRUE ) Age_Group <- cut ( Age, c ( 18 , 30 , 40 , 50 , 60 , 70 , 80 ) , labels = c ( "18-29" , "30-39" , "40-49" , "50-59" , "60-69" , "70-79" ) ) data <- data.frame ( Gender, Age_Group ) table ( data $Gender , data $Age_Group ) 18-29 30-39 40-49 50-59 60-69 70-79...
Image
WORLD MAP | K-MEANS CUSTERING | DATA VISUALIZATION read the dataset df <- read.csv("C:/Users/Asus/Desktop/VERİ BİLİMİ YÜKSEK LİSANS/R -Data Visualisation/blog/blog-9/worldcities.csv") head(df) > str(df) 'data.frame': 26569 obs. of  11 variables:  $ city      : chr  "Tokyo" "Jakarta" "Delhi" "Mumbai" ...  $ city_ascii: chr  "Tokyo" "Jakarta" "Delhi" "Mumbai" ...  $ lat       : num  35.69 -6.21 28.66 18.97 14.6 ...  $ lng       : num  139.7 106.8 77.2 72.8 121 ...  $ country   : chr  "Japan" "Indonesia" "India" "India" ...  $ iso2      : chr  "JP" "ID" "IN" "IN" ...  $ iso3      : chr  "JPN" "IDN" "IND" "IND" ...  $ admin_name: chr  "Tōkyō" "Jakarta" "Delhi" "Mahārāshtra" ...  $ capital   : chr  "primary" "prima...
Image
 UNSUPERVISED LEARNING-CLUSTER ANALYSIS IN R Unsupervised learning is a type of machine learning where the model is trained on unlabeled data, without a specific target variable or output. The goal of unsupervised learning is to uncover hidden patterns or structure in the data, and it is used for tasks such as clustering, anomaly detection, and dimensionality reduction. Some common unsupervised learning techniques include: Clustering: grouping similar data points together. Dimensionality reduction: reducing the number of features in the data while preserving the most important information. Anomaly detection: identifying data points that are unusual or different from the others. Unlike supervised learning, unsupervised learning does not have a clear goal or objective to optimize for, so the evaluation of unsupervised learning models can be more challenging. Unsupervised learning is widely used in many fields, such as natural language processing, computer vision, and bioinformatics. ...