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.
- Python | Create Test DataSets using Sklearn
- Learning Model Building in Scikit-learn : A Python Machine Learning Library
- Artificial intelligence vs Machine Learning vs Deep Learning
- How to Start Learning Machine Learning?
- Difference Between Artificial Intelligence vs Machine Learning vs Deep Learning
- Need of Data Structures and Algorithms for Deep Learning and Machine Learning
- Azure Virtual Machine for Machine Learning
- Using Google Cloud Function to generate data for Machine Learning model
- ML | Label Encoding of datasets in Python
- ML | One Hot Encoding of datasets in Python
- How to use datasets.fetch_mldata() in sklearn - Python?
- Datasets in Keras
- ML | Reinforcement Learning Algorithm : Python Implementation using Q-learning
- Introduction To Machine Learning using Python
- Data Preprocessing for Machine learning in Python
- Best Python libraries for Machine Learning
- Why is Python the Best-Suited Programming Language for Machine Learning?
- Top Python Notebooks for Machine Learning
- Python - Create UIs for prototyping Machine Learning model with Gradio
- ML | Types of Learning – Supervised 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.