Skip to main content

Posts

Showing posts from August, 2023

TITANIC DATASET

The data includes demographic and travel information for 1,309 Titanic passengers to predict their survival. The whole Titanic dataset is accessible in multiple forms from the Department of Biostatistics at Vanderbilt University School of Medicine ( http://biostat.mc.vanderbilt.edu/wiki/pub/Main/DataSets/titanic3.csv ). The go-to resource for information about the Titanic is the website for Encyclopaedia Titanica ( https://www.encyclopedia-titanica.org/ ). It includes a complete list of the passengers and crew and all the relevant information on the Titanic's facts, history, and data. Additionally, the Titanic dataset is the focus of the inaugural competition on Kaggle.com ( https://www.kaggle.com/c/titanic ; needs creating a Kaggle account). Additionally, a CSV version is available in the GitHub repository at https://github.com/alexperrier/packt-aml/blob/master/ch4 . Download Dataset: https://drive.google.com/file/d/1mYc9-t_snfQUSkEm_hVXBmLscz7pl40S/view?usp=drive_link  ( with Nul...

Swapping Private data of classes

CASE:1 Given two numbers a & b, swap these two numbers using the friend function of C++.  Examples:  Input : a = 15, b = 9 Output : a = 9, b = 15 Input : a = 4, b = 16 Output : a= 16, b = 4 Approach:  Create a class Swap, declare one variable in it, i.e., num, and create a constructor for inputs. Declare a friend function in it. Define the friend function outside the class scope by taking arguments as call by reference to pass the copy of Swap Object. Perform the swap operation.