DEV Community

Durga Pokharel
Durga Pokharel

Posted on

3 2

Day 90 Of #100DaysOfCode: Overfitting and Underfitting

Today, is my 90th day of #100daysofcode and #python learning journey. 29th march pass out by writing blog for project, pushing to the GitHub. Did some some random works.

And at the end of the day grasp knowledge from Datacamp regarding to the topic overfitting and underfitting and train test split. I really take joy with following image recognition code.

Code

# Import necessary modules
from sklearn import datasets
import matplotlib.pyplot as plt
# Load the digits dataset: digits
digits = datasets.load_digits()
# Print the keys and DESCR of the dataset
# Print the shape of the images and data keys
print(digits.keys())
print(digits.DESCR)
print(digits.images.shape)
print(digits.data.shape)

Enter fullscreen mode Exit fullscreen mode
# Display digit 1010
plt.imshow(digits.images[1010], cmap=plt.cm.gray_r, interpolation='nearest')
plt.show()

Enter fullscreen mode Exit fullscreen mode

Output of above code is,

image


Day 90 Of #100daysofcode and #Python
Overfitting and Underfitting From https://t.co/iA9NKAytnlDataCamp#WomenWhoCode #CodeNewbie #100DaysOfCode #DEVCommunity pic.twitter.com/2DVFtvfN8q

— Durga Pokharel (@durgacodes) March 29, 2021

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay