Machine Learning (ML) Random Decision Forest Random forests or random decision forests are an ensemble learning method for classification, regression and other tasks that operates by constructing a multitude of decision trees at training time. There are three important hyperparameters namely n_estimators, random_state and max_features
Machine Learning (ML) Generative Model A Generative Model is a way of learning any kind of data distribution. Generative modeling algorithms process the training data and make reductions in the data. The main aim is to learn the true data distribution of the training set so that the new data points are generated with some variations.
Machine Learning (ML) Discriminative Model Discriminative models, also referred to as conditional models, are a class of models used in statistical classification, especially in supervised machine learning. Discriminative modelling studies the P(y|x) i.e, it predicts probability of y(target) when given x(training samples).
Machine Learning (ML) XGBoost XGBoost is short for extreme gradient boosting. It is an optimized distributed gradient boosting library designed to be highly efficient, flexible and portable. It implements machine learning algorithms under the Gradient Boosting framework. It provides a parallel tree boosting known as GBDT, GBM
Machine Learning (ML) Independent Component Analysis (ICA) Independent component analysis (ICA) is a statistical and computational technique for revealing hidden factors that underlie sets of random variables, measurements, or signals and is a special case of blind source separation. A common application is to listen to one person's speech in a noisy room
C++ Threads in C++ Threads are generally referred to as lightweight processes and executes different parts of a program and shares memory, file descriptors and system resources. We explore multithreading creation of threads with free, member function, functor object, lambda expression, race condition with mutex
C Programming Dynamic memory allocation in C The process of allocating memory at run time is known as dynamic memory allocation. Although C does not inherently have this facility, there are four library routines that can be used for allocating and freeing memory during program execution: malloc, calloc, realloc and free
C++ Function Overriding in C++ Function overriding (compile time polymorphism) is a feature in C++ that allows us to have a function in child class which is already present in the parent class. A child class inherits the data members and member functions of parent class and to override functionality, function overriding is used
C++ Function Overloading in C++ Function overloading is a feature in C++ where two or more functions can have the same name but different parameters. This is used in situations when a class B is inherits from class A and a particular behaviour of the class B needs to be modified.
Algorithms Conversion of Infix to Postfix Expression using Stack To convert Infix expression to Postfix expression, we will use the stack data structure. By scanning the infix expression from left to right,if we get any operand, simply add it to the postfix form, and for the operator and parenthesis, add them in the stack maintaining the precedence of them.
C++ for loop in C++ For loop has three components: initialization Statement, test Expression and update Statement. We have explored for loop in C++ and presented examples and compared it with while loop.
C Programming Static memory allocation in C In C, the default way of memory allocation is static. Static memory allocation is an allocation technique which allocates a fixed amount of memory during compile time and the operating system internally uses a data structure known as Stack to manage it We define static variables and how to delete it
Software Engineering goto statement in C The goto statement is a jump statement which is sometimes also referred to as unconditional jump statement. The goto statement can be used to jump from anywhere to anywhere within a function. The use of goto statement is highly discouraged and can be avoided using break and continue statements.
Software Engineering Break Statement in C Break Statement is a loop control statement which is used to terminate the loop. As soon as the break statement is encountered from within a loop, the loop iterations stops there and control returns from the loop immediately to the first statement after the loop. break can be used in all loop
Software Engineering Error Handling in C In C when some error occurs then -1 or NULL value is returned and a global variable errno is set with the error code.Hence we use returned values to check errors. We use EXIT_SUCCESS ,EXIT_FAILURE to deal with errors. There are three types of errors syntax, logical and semantic.
Data Structures Hash Map / Hash table Hash map (hash table, unordered map, dictionary, hash set) is a widely used efficient data structure that used to store data which can be searched in constant time O(1). This data structure is implemented over an array that maps keys to values that is it is a set of key value pairs.
Machine Learning (ML) Linear Regression in Python with TensorFlow In this guide, we will implement Linear Regression in Python with TensorFlow. Linear Regression is a simple yet effective prediction that models any data to predict an output based on the assumption that it is modeled by a linear relationship.
Algorithms Binary Lifting with k-th ancestor and lowest common ancestor (LCA) Binary Lifting is a technique used to find the k-th ancestor of any node in a tree in O(log N). This also leads to a faster algorithm in finding the lowest common ancestor (LCA) between two nodes in a tree. The technique requires preprocessing the tree in O(N log N) using dynamic programming.
Python Create arrays in Numpy Numpy functions that we have covered are arange(), zeros(), ones(), empty(), full(), eye(), linspace() and random(). Creating and managing arrays is one of the fundamental and commonly used task in scientific computing. Numpy is a Python library which adds support for several mathematical operations
Algorithms Bipartite checking using Graph Colouring and Breadth First Search (BFS) [O(V+E) time] The algorithm to determine whether a graph is bipartite or not uses the concept of graph colouring and BFS and finds it in O(V+E) time complexity on using an adjacency list and O(V^2) on using adjacency matrix. It is used to decode codewords and model situations in cloud computing and big data
Data Structures XOR Linked List XOR Linked List is the memory efficient version of Doubly Linked List because it makes use of only one space for address field with every node. It provides facilitates list traversal in both forward and backward directions. Insertion and deletion operations take constant time
Machine Learning (ML) Logistic Regression Logistic Regression is an efficient regression algorithm that aims to predict categorical values, often binary. It is widely used in the medical field to classify sick and healthy individuals and areas that need to determine a client's risk such as financial companies.
Software Engineering Functions in C A function in C is a set of statements that take inputs, do some specific computation and produces output. The idea is to put some commonly or repeatedly done task together and make a function, so that instead of writing the same code again and again for different inputs, we can call the function.
Software Engineering An in-depth look into Recursion in C Recursion is a coding technique/ design in which a function calls itself directly or indirectly and the corresponding function is called as recursive function. Using this many problems can be solved easily with less time. C, C++, Java, Python, Go and others support Recursion except Fortan 77
Software Engineering malloc vs calloc vs realloc We take a deep look into the 3 dynamic memory allocation techniques in C/ C++ namely malloc, calloc and realloc and explore the difference. malloc stand for memory allocations, calloc for contiguous allocation and realloc for re-allocation.