Whenever we think of Machine Learning, the first thing that comes to our mind is a dataset. While there are many datasets that you can find on websites such as Kaggle, sometimes it is useful to extract data on your own and generate your own dataset. Generating your own dataset gives you more control over the data and allows you to train your machine learning model.
In this article, we will generate random datasets using the Numpy library in Python.
-> Numpy: sudo pip install numpy -> Pandas: sudo pip install pandas -> Matplotlib: sudo pip install matplotlib
In probability theory, normal or Gaussian distribution is a very common continuous probability distribution that is symmetric about the mean, showing that data near the mean are more frequent in occurrence than data far from the mean. Normal distributions used in statistics and are often used to represent real-valued random variables.
The normal distribution is the most common type of distribution in statistical analyses. The standard normal distribution has two parameters: the mean and the standard deviation. The mean is the central tendency of the distribution. The standard deviation is a measure of variability. It defines the width of the normal distribution. The standard deviation determines how far away from the mean the values tend to fall. It represents the typical distance between the observations and the average. it fits many natural phenomena, For example, heights, blood pressure, measurement error, and IQ scores follow the normal distribution.
Graph of normal distribution:
Let us look at a better example.
We will generate a dataset with 4 columns. Each column in the dataset represents a feature. The 5th column of the dataset is the output label. It varies between 0-3. This dataset can be used for training a classifier such as a logistic regression classifier, neural network classifier, Support vector machines, etc.
- Using Google Cloud Function to generate data for Machine Learning model
- Learning Model Building in Scikit-learn : A Python Machine Learning Library
- Python | Create Test DataSets using Sklearn
- Introduction To Machine Learning using Python
- Best Python libraries for Machine Learning
- Data Preprocessing for Machine learning in Python
- Why is Python the Best-Suited Programming Language for Machine Learning?
- Artificial intelligence vs Machine Learning vs Deep Learning
- Azure Virtual Machine for Machine Learning
- How to Start Learning Machine Learning?
- ML | What is Machine Learning ?
- Machine Learning in C++
- ML | One Hot Encoding of datasets in Python
- Clustering in Machine Learning
- How Does NASA Use Machine Learning?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.