Posts

Showing posts with the label ID3

MACHINE LEARNING USING PYTHON LAB

  MACHINE LEARNING USING PYTHON LAB Course Outcomes: At the end of the course the student should be able to: 1.      Select data, model selection, model complexity and identify the trends. 2.      Understand a range of machine learning algorithms along with their strengths and weaknesses. 3.      Build predictive models from data and analyze their performance. List of Experiments WEEK 1 : a)      Write a program using scikit-learn to implement K-means Clustering b)      Program to calculate the entropy and the information gain c)      Program to implement perceptron. WEEK 2: ·        Implement and demonstrate the FIND-S algorithm for finding the most specific hypothesis based on a given set of training data samples. Read the training data from a .CSV file. WEEK 3: ·        Fo...

Decision Tree Classification _ Program

Q.  Decision Tree Classification Problem Description As you know, Decision Tree is all about splitting nodes at different levels and trying to classify accurately as much as possible. You are given a feature (1-d array) and label (1-d array) (target) where you have to determine which value in the corresponding feature is best to split upon at the first root level for building a decision tree. The feature would be having continuous values whereas the target is binary in nature. So, The main task is to determine which value/threshold is best to split upon considering the classification task taking the loss as entropy and maximizing Information Gain. Input Format Two inputs: 1. 1-d array of feature 2. 1-d array of label Output Format Return threshold value Example Input feature: [0.58 0.9  0.45 0.18 0.5  0.12 0.31 0.09 0.24 0.83] label: [1 0 0 0 0 0 1 0 1 1] Example Output 0.18 Example Explanation If you calculate Information Gain for all of the feature values, it would be c...