What are the Time and Space complexities of Decision Trees?

  Рет қаралды 1,462

SriharshAI

SriharshAI

Күн бұрын

Training:
Time Complexity: O(d*nlogn)
Space Complexity: O(nodes/rules)
Inferencing:
Time Complexity: O(depth)
Space Complexity: O(nodes/rules)

Пікірлер: 8
@frankl1
@frankl1 8 ай бұрын
This is only the time complexity needed to sort the features. This has to be repeated for each node in the tree
@hamzawi2752
@hamzawi2752 Ай бұрын
Assuming that the worset case happens in a balanced decision tree which has log(n) levels where n is number of samples. The time complexity in inference is measured by the depth of the tree which equals to log(n). Therefore. Single Sample Inference: O(log(n)) Inference for m Samples: O(m * log(n))
@panchajanyanaralasetty7370
@panchajanyanaralasetty7370 8 ай бұрын
(n (log n) * d), has to be multiplied with no. of splits in the right?
@srisaisubramanyamdavanam9912
@srisaisubramanyamdavanam9912 2 ай бұрын
No that is not good way.Instead u sort features at first itself then u use throughout the training process.That is more efficient
@frankl1
@frankl1 Жыл бұрын
The training time complexity in the video should be multiplied by the number of nodes in the tree. This is n in the worst case. So the final training time complexity should be O(n^2logn * d)
@jinxscript
@jinxscript 8 ай бұрын
isnt it n log2 n
@srisaisubramanyamdavanam9912
@srisaisubramanyamdavanam9912 2 ай бұрын
We define time complexity for a split not for whole process
@hamzawi2752
@hamzawi2752 Ай бұрын
@@jinxscript you are right. It should be O(n * d * log(n)^2)
Visual Guide to Decision Trees
6:26
Econoscent
Рет қаралды 36 М.
O(n log n) Time Complexity Explanation
5:58
itstheresa
Рет қаралды 4,5 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
12 UNPLEASANT THINGS You Do as You AGE and NO ONE
12:46
Signs of Joy
Рет қаралды 319
magnification ratio for lens
3:50
Acharya academy india
Рет қаралды 11
How Dijkstra's Algorithm Works
8:31
Spanning Tree
Рет қаралды 1,4 МЛН
Part 30-Cost complexity pruning and other hyperparameters in decision trees
16:46
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН