Diabetes Dataset
The load_diabetes function from scikit-learn provides a dataset for regression analysis, featuring physiological measurements and diabetes progression indicators from 442 patients.
Samples total |
442 |
Dimensionality |
10 |
Features | real, -.2 < x < .2 |
Targets | integer 25 – 346 |
Diabetes dataset Example:
from sklearn.datasets import load_diabetes
import pandas as pd
# Load the Diabetes dataset
diabetes = load_diabetes()
# Creating a DataFrame from the dataset for easier manipulation
diabetes_df = pd.DataFrame(data=diabetes.data, columns=diabetes.feature_names)
diabetes_df['target'] = diabetes.target
# Print the first few rows of the DataFrame
print(diabetes_df.head())
Output:
age sex bmi bp s1 s2 s3 \
0 0.038076 0.050680 0.061696 0.021872 -0.044223 -0.034821 -0.043401
1 -0.001882 -0.044642 -0.051474 -0.026328 -0.008449 -0.019163 0.074412
2 0.085299 0.050680 0.044451 -0.005670 -0.045599 -0.034194 -0.032356
3 -0.089063 -0.044642 -0.011595 -0.036656 0.012191 0.024991 -0.036038
4 0.005383 -0.044642 -0.036385 0.021872 0.003935 0.015596 0.008142
s4 s5 s6 target
0 -0.002592 0.019907 -0.017646 151.0
1 -0.039493 -0.068332 -0.092204 75.0
2 -0.002592 0.002861 -0.025930 141.0
3 0.034309 0.022688 -0.009362 206.0
4 -0.002592 -0.031988 -0.046641 135.0
What is Toy Dataset – Types, Purpose, Benefits and Application
Toy datasets are small, simple datasets commonly used in the field of machine learning for training, testing, and demonstrating algorithms. These datasets are typically clean, well-organized, and structured in a way that makes them easy to use for instructional purposes, reducing the complexities associated with real-world data processing.