MindMap Gallery Tree Regression Algorithm Knowledge Points Study Notes
Tree regression algorithm knowledge points study notes: local modeling of complex data, construction of trees for continuous and discrete features, using the CART algorithm for regression, and using Python's Tkinter library to create GUIs.
Edited at 2022-12-23 11:26:53Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
Tree Regression Algorithm Knowledge Points Study Notes
Modeling locality in complex data
tree regression
advantage
Can model complex and non-linear data
shortcoming
The results are difficult to understand
Applicable data types
Numerical type
Nominal type
General method
Data collection
any method
Prepare data
Requires numeric data
Nominal type needs to be converted to binary type
analyze data
Plot a 2D visualization of your data
Dictionary-based tree generation
training algorithm
Most of the time is spent on the construction of the leaf node tree model
Test algorithm
Analyze model performance using R2 values on test data
Use algorithms
Use trained trees to make predictions
Prediction results can also be used to do many things
ID3
question
Split too quickly
Cannot handle continuous features directly
CART
binary segmentation
Divide the data set into two parts each time
Easy to adjust during tree construction to handle continuous features
Saves build time
Construction of trees for continuous and discrete features
Dictionary to store trees
Include
Features to be segmented
Feature value to be segmented
right subtree
When segmentation is no longer needed, it can be a single value
left subtree
Similar to right subtree
pseudocode
Find the best features to be segmented
If the node cannot be divided, it is stored as a leaf node.
Perform binary splitting
The right subtree calls createTree()
The left subtree calls createTree()
Using the CART algorithm for regression
regression tree
Leaf nodes are constant values
The confusion of continuous data
Calculate the mean of all data
Calculate the difference between the value of each piece of data and the mean
square/absolute value
Build tree
chooseBestSpilt()
Split the data set in the best way
Generate corresponding leaf nodes
regLeaf()
Generate leaf nodes
mean of target variable
regErr()
var()
mean square error function
pseudocode
for each feature
for each eigenvalue
Split the data set into two parts
Calculate segmentation error
If the current error is less than the minimum error, the current segmentation is set as the best segmentation and the minimum error is updated.
Returns the features and thresholds for the best segmentation
The timing will not be divided
All values are equal
The effect is not much improved after segmentation
The size of the two subsets after segmentation, one is smaller than the user-defined minimum number of samples for segmentation
run code
tree pruning
pruning
Avoid overfitting by reducing the complexity of decision trees
pre-pruning
question
The algorithm is very sensitive to the input parameters tolN and tolS
post-pruning
Thought
The data set needs to be divided into test set and training set
First, specify the parameters so that the constructed tree is large enough and complex enough to facilitate pruning.
Then, find the leaf nodes from top to bottom, and use the test set to determine whether the merger can reduce the test error. If so, merge
pseudocode
Split data based on existing trees
If any subset is a tree, recursively prune the subset
Calculate the error after merging the current two leaf nodes
Calculate the error without merging
If the error is reduced after merging, merge
Collapse treatment
Returns the tree average
result
A large number of nodes were pruned, but not into two parts
Explain that post-pruning may not be as effective as pre-pruning
Both pruning techniques should be used simultaneously
model tree
Leaf nodes are piecewise linear functions
advantage
Interpretability
Higher forecast accuracy
Algorithm key
Calculation of error
For a given data set, first fit a linear model
Then calculate the difference between the true target value and the predicted value
Summing the squares of these differences gives the desired error
Which model is better?
Calculate the correlation coefficient R2
Creating a GUI using Python’s Tkinter library
Create GUI with Tkinter
Integrate Matplotlib and Tkinter
ikB
Create a raster image from an image