Question about operator's complexity

RintasponRintaspon Member Posts: 2 Contributor I
edited November 2018 in Help

Hello, I would like to know what are time complexities (Big O) of these predictive operators?

  • k-NN
  • Naive Bayes
  • Decision Tree
  • Neural Net

And if possible, could anyone please give me psuedocode of (or how to inspect) these operators? because I need to know how the operators work with my data, especially the Decision Tree. Thank you.

Best Answers

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn
    Solution Accepted

    Hi @Rintaspon,


    Did you check out It allows you to 'guesstimate' how the models behave. Also, there is that describes the various operators and algorithms as well. If you really need the code, then you'd have to vist the RapidMiner Github acct for the source code.

  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn
    Solution Accepted

    As @Thomas_Ott said, is a great resource.

    From a quick-and-dirty perspective, I would rank these algorithms as follows in terms of time intensity to complete:

    • Naive Bayes (simple counting and basic math is all that ever happens, it's very efficient)
    • k-NN (lazy algorithm takes little time in training but will be slower when applied to new data)
    • Decision Tree (straightforward solutions with simple splits, also very fast to compute)
    • Neural Net (this is an iterative solution and can be computationally intensive depending on the configuration of number of nodes and hidden layers)

    I hope this helps.


    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager
    Solution Accepted

    hello @Rintaspon - I agree with @Telcontar120 and @Thomas_Ott that is your go-to for day-to-day general sense of complexity.  If you are looking for a more theoretical approach to determine Big O (e.g. O(n) vs O(mn) etc..), you are going to find this in comp sci / ML textbooks on the subject.  A 30-second google search turned up something like this.


    As for pseudocode, again this is normally found in textbooks.  Mine is from circa 1990 so I'm not sure you want it.  :)




Sign In or Register to comment.