ML Lab - 3
ML Lab - 3
STEPS:
1. Create Own Dataset:
In this step, we define the data that we want to analyze. This involves selecting
the features (e.g., height, weight) and the target variable (e.g., classifying
individuals as "fit" or "unfit").
Here we manually create a small dataset with sample data points to be used in
your machine learning model.
data = { 'Height': [150, 160, 170, 180, 190, 200],
'Weight': [50, 60, 70, 80, 90, 100],
'Class': ['fit', 'fit', 'fit', 'unfit', 'unfit', 'unfit']
}
After creating the dataset, you need to load it into your Python environment.
This is typically done using a library like Pandas, which allows you to read the
dataset from various formats such as CSV files.
Example: We loaded the dataset from a CSV file using
pd.read_csv('fitness_data.csv').
Once the dataset is loaded, it's important to inspect it to understand its structure
and contents. Displaying the dataset allows you to verify that the data has been
loaded correctly and helps you to identify any issues such as missing values or
incorrect data types.
Example: We used df.head() to display the first few rows of the dataset, giving us
a quick overview of the data.