शुरू करेंमुफ़्त में शुरू करें

प्रेडिक्शन की शुद्धता जाँचना

अब समय है जाँचने का कि आपका प्रशिक्षित मॉडल प्रेडिक्शन कितनी अच्छी तरह करता है! score() मेथड के साथ, अपनी टेस्टिंग सेट का उपयोग करके अपनी Decision Tree model की accuracy जाँचिए.

यह अभ्यास पाठ्यक्रम का हिस्सा है

HR Analytics: Python में कर्मचारी churn की भविष्यवाणी

पाठ्यक्रम देखें

अभ्यास निर्देश

  • Training सेट में features को target पर फिट करने के लिए decision tree model लागू करें.
  • Training सेट के लिए प्रेडिक्शन की accuracy score() जाँचें.
  • Test सेट के लिए प्रेडिक्शन की accuracy score() जाँचें.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Apply a decision tree model to fit features to the target in the training set
model.fit(____,____)

# Check the accuracy score of the prediction for the training set
model.____(features_train,____)*100

# Check the accuracy score of the prediction for the test set
model.____(____,____)*100
कोड संपादित करें और चलाएँ