• Decision Tree

    No posts found.

    Read More

  • Decision Tree – What Are Attribute Selection Measures In A Decision Tree ?

    Data Science – What Are Attribute Selection Measures Used In Decision Tree ? Table Of Contents: Entropy. Information Gain. Gini Index. Gain Ratio. Chi – Square Test. Reduction In Variance. (1) Entropy: (2) Information Gain (3) What Is Gini Index ? Why We Do Square Of Probability ? Why We Do Square Of Probability ? (4) What Is The Issue With Information Gain ? (5) What Is Gain Ratio ? Example:

    Read More

  • Decision Tree – When Should We Stop Growing Decision Tree ?

    Data Science – When Should We Stop Growing Decision Tree ? Table Of Contents: When Should We Stop Growing Decision Tree? (1) When Should We Stop Growing Decision Tree Algorithm ?

    Read More

  • Decision Tree – Hyper Parameters In Decision Tree.

    Hyper Parameters In Decision Tree Table Of Contents: Maximum Depth (max_depth) Minimum Samples Split (min_samples_split) Minimum Samples per Leaf (min_samples_leaf) Maximum Features (max_features) Maximum Leaf Nodes (max_leaf_nodes) Minimum Impurity Decrease (min_impurity_decrease) Split Criterion (criterion) Random State (random_state) Class Weight (class_weight) Presort (presort) Splitter (splitter) (1) Maximum Depth (max_depth) from sklearn.datasets import load_iris from sklearn.tree import DecisionTreeClassifier, export_text from sklearn.tree import plot_tree import matplotlib.pyplot as plt # Load the Iris dataset iris = load_iris() X, y = iris.data, iris.target # Build a decision tree with max_depth=3 clf = DecisionTreeClassifier(max_depth=3, random_state=42) clf.fit(X, y) # Plot the decision tree plt.figure(figsize=(12, 8)) plot_tree(clf, feature_names=iris.feature_names,

    Read More

  • Decision Tree – Drawbacks Of Decision Tree.

    Drawbacks Of Decision Tree Table Of Contents: Overfitting Instability Biased Towards Features with More Levels Difficulty with Continuous Variables Greedy Nature (Local Optima) Lack of Smooth Decision Boundaries Poor Performance on Unstructured Data Computational Complexity for Large Datasets Difficulty in Handling Correlated Features Interpretability Challenges for Large Trees (1) Overfitting (2) Instability (3) Biased Towards Features with More Levels (4) Difficulty with Continuous Variables (5) Greedy Nature (Local Optima) (6) Lack of Smooth Decision Boundaries (7) Poor Performance on Unstructured Data (8) Computational Complexity for Large Datasets (9) Difficulty in Handling Correlated Features (10) Interpretability Challenges for Large Trees

    Read More

  • Decision Tree – Gini Index In Decision Tree.

    What Is Gini Index? Table Of Contents: Introduction To Gini Index. Formula & Calculation. Gini Index In Decision Tree. Properties Of Gini Index. Weighted Gini Index. Gini Index Vs Entropy. Splitting Criteria and Gini Index. Advantages and Limitation Of Gini Index. Practical Implementation. Real-World Examples Advanced Topics (1) Introduction To Gini Index. Definition Of Gini Index In the context of decision trees, the Gini Index is a metric used to evaluate the purity of a split or node. It quantifies the probability of incorrectly classifying a randomly chosen element from the dataset if it were labeled randomly according to the

    Read More

  • Decision Tree : Gain Ratio In Decision Tree.

    Gain Ratio In Decision Tree Table Of Contents: What Is Gain Ratio In Decision Tree? Example Of Gain Ratio Interpreting Split Information What Is The Range Of Gain Ratio? What We Want ? Balanced, Unbalanced & Moderate Split Which Split Information Is Better: Balanced, Unbalanced & Moderate Split How Gain Ratio Penalized Lower Split Information? Advantages Of Gain Ratio Disadvantages Of Gain Ratio (1) What Is Gain Ratio In Decision Tree? In decision tree learning, the Gain Ratio is an improvement over Information Gain to evaluate splits. While Information Gain measures the effectiveness of a feature in classifying the data,

    Read More

  • Decision Tree : Information Gain In Decision Tree.

    Information Gain Table Of Contents: What Is Information Gain? Advantages Of Information Gain. Limitation Of Information Gain. Information Gain: Advantages Of Information Gain: Limitation Of Information Gain:

    Read More

  • Decision Tree – Attribute Selection Measures In Decision Tree.

    What Are Attribute Selection Measures For Decision Tree? Table Of Contents: What Are Attribute Selection Measures For Decision Tree? What Are Attribute Selection Measures For Decision Tree? Attribute selection measures (ASMs) are criteria or metrics used in decision trees to determine the best attribute (or feature) to split the dataset at each node. The goal of these measures is to create pure child nodes by reducing uncertainty or impurity in the data, thereby improving the tree’s decision-making ability.

    Read More

  • Decision Tree – How The Decision Tree Choses The Splitting Criteria If The Attribute Is Numeric?

    How Decision Tree Choses The Splitting Criteria If The Attribute Is Numeric In Nature? Table Of Contents: How Decision Tree Choses The Splitting Criteria If The Attribute Is Numeric In Nature? How Decision Tree Choses The Splitting Criteria If The Attribute Is Numeric In Nature? When an attribute in a decision tree is numeric (e.g., age, salary, temperature), the splitting criteria involve finding an optimal threshold value to divide the data into two subsets. This is done to maximize the Information Gain (or other metrics like Gini Index). Below is the step-by-step explanation: Steps to Handle Numeric Attributes in Splitting

    Read More