Different Types of Machine Learning System.

Data Mining is a process of applying ML techniques to dig into large amounts of data can help to discover patterns that were not immediately apparent.


Types of Machine Learning System:

Machine Learning system can be classified according to the amount and type of supervision they get during training.


Supervised learning: In supervised learning, the training data you feed to the algorithm includes the desired solutions, called labels.

supervised learning

Spam Filter of your Gmail Inbox is a good example of this, as it is trained with many emails (spam & ham) and it must have to learn how to classify new emails.

A typical supervised learning task is classification.


Some important supervised learning algorithm:

  • K-Nearest Neighbors.
  • Linear Regression.
  • Logistic Regression.
  • Support Vector Machines(SVMs).
  • Decision Trees.
  • Random Forest.
  • Neural network.

Unsupervised Learning: In unsupervised learning, the training data unlabeled and the system try to learn without the teacher.


Some important unsupervised learning algorithm:

  • Clustering.
  • K-Means.
  • Hierarchical Cluster Analysis(HCA).
  • Expectation-Maximization.
  • Visualization and dimensionality reduction.
  • Principal component analysis(PCA).
  • Kernel PCA.
  • Logical Linear Embedding(LLE)
  • t-distributed Stochastic Neighbor Embedding(t-SNE).
  • Association rule learning.
  • Apriori.
  • Eclat.
unsupervised learning

For example Grouping the visitor of your blog into a different group like 40% of visitors are male who likes cricket and 20% of men like football. You don’t even have to tell which group visitors belongs to, the clustering algorithm finds those connections by themselves.

 

Semisupervised Learning: In this, the algorithm has to deal with lots of unlabeled data and a little bit of labeled data.


Google Photos are good examples of semisupervised learning. After uploading the photos, it automatically recognize if a person is present in many different photos now you just have to tell who these people are. One label per person and later it will help you search for photos.  


Most of the semisupervised learning algorithms are a combination of supervised and unsupervised algorithms.


Reinforcement Learning: The best example of a reinforcement learning algorithm is a robot learning how to walk. The robot observes the environment, select and perform an action and get rewards or penalties, and base on this the robot decide what to do and what not to do.  

reinforcement learning

Another criterion used to classify Machine Learning systems is whether or not the system can learn incrementally from a stream of incoming data.


Batch Learning: In batch learning, the system is not capable of learning incrementally with time. As it takes a lot of time and computing resources so the entire process is done offline. First, the system is trained, and then it is launched into production and runs without learning anymore. It is also known as offline learning.


Online Learning: In this algorithm, you train the system incrementally by feeding data continuously, either individually or by small groups called mini-batches. The best use of this learning is for stock prices where data change rapidly.


Machine Learning system is also categorized base on generalization:


Instance-based learning: In this learning, the system learns the old examples by heart then generalizes to new cases using a similarity measure.


Model-based learning: In model-based learning, we build a model of these examples then use that model to make predictions.  

Binary Tree Important Definition and Properties.

 Binary Tree


Tree: Non-Linear Data Structure in which data is organized in a hierarchical manner.  It is very fast for information retrieval and searching operations. 


Important Terminology of a Binary Tree.


Node: Each element in a tree is called a node.

Edges: Lines connecting two nodes, it is also known as branches. 

Parent Node: The immediate predecessor of a node (node that comes just before a node).

Child Node: The immediate successors of a node (node that comes just next in line).

Root Node: The node that doesn't have any parent node.

Leaf Node: The node that doesn't have any child node. The node other than the leaf node is known as a non-leaf or terminal node. 

Level: Distance of that node from the root.

Height: Total number of level, depth of the tree, Level+1=Height

Siblings: All nodes having the same parent. All siblings are at the same level but it is not necessary that nodes at the same level are siblings.

Path: It is a way to reach a node from any other node. In a tree, there is only one path possible between any two nodes. Path length = Number of Edges on the path.

Degree: The number of children or subtrees connected to a node.

Forest: The subtrees we get after removing the root of the main tree is collectively called as Forest (also known as a set of disjoint trees).  

Strictly Binary Tree: Each node in the tree is either a leaf node or has exactly two children. There is no node with one child. 

Extended Binary tree: Each Empty subtree is replaced by a special node then the resulting tree is extended binary tree or 2-tree.

Full Binary tree: All the levels have the maximum number of nodes.

**If the number of any node is k, then the number of the left child is 2k, the number of right children is 2k+1, and the number of its parent is k/2.

Complete Binary Tree: All the levels have the maximum number of nodes except possibly the last node.


Important Properties of a Binary Tree.

P1. The maximum number of nodes possible on any level i is 2^i where i>=0.

P2. The maximum number of nodes possible in a binary tree of height h is 2^h-1.

P3. The minimum number of nodes possible in a binary tree of height h is equal to h. A tree with a minimum number of nodes is called skew trees.

P4. If a binary tree contains n nodes, then its maximum height possible is n and the minimum height possible is log2(n+1).

P5. In a non-empty binary tree, if n is the total number of nodes and e is the total number of edges, then e = n-1.


P6. In a non-empty binary tree, if n is the number of nodes with no child and m is the number of nodes with 2 children, then n = m+1.

Traversal in Binary Tree
1. Breadth-First Traversal (Level Order Traversal)
2. Depth First Traversal
APreorder Traversal (Root, Left, Right)
BInorder Traversal (Left, Root, Right)
CPostorder Traversal (Left, Right, Root)

Edit your videos for free using VLC media player.

Edit using VLC Media Player

 

VLC is usually thought of as a media player and a very good one at that. However, there’s more to the software than meets the eye. Did you know you can use it to make simple edits to your videos as well as just watch them? This saves you needing to download a separate video-editing tool if you’re short on space or don’t use one often enough to justify the installation.

 

Trim a video clip using a VLC media player.

 

#Step 1:

First, we’ll look at how to trim video, so you can remove unwanted sections to create a clip. To do this, you need some extra tools. Open the View menu and choose Advanced Controls. This adds a Record button and a useful ‘Frame by frame’ button.

 

Video Trim using VLC

#Step 2:

Load the video and watch it through to make sure you’re familiar with where you want to start and endpoints to be. Use the slider to get the video near and immediately press the Record button when you get to the correct place.

 

trim video step 2

#Step 3:

You have to mark the end of your clip manually. When the video gets to the stop point, click the Record button again. The trimmed video file is saved to your Videos folder with ‘vlc_record’ at the front of its name. Do this as many times as required to collect the clips that you need.

 

Stick video clips together using a VLC media player.

While VLC is perfectly capable of sticking video clips together, the option was removed from the latest version of the graphical interface. However, the action can still be performed from the Command Prompt. Start by renaming the files you want to stitch together-use a simple, consecutive system, such as numbering them.

 

#Step 1:

Close any instances of VLC that you have open. Enter cmd in the search box to launch the Command Prompt, and navigate to the folder that contains your renamed video files. In our case, we used cd c:\Users\Praveen Kumar\Videos.

 

#Step 2:

Next, type a command with the path to the vlc.exe file, the names of all the files you want to join, and a couple of additional commands including the name of the final file. Our was “C:\Program Files\VideoLAN\VLC\vlc.exe” 1.mp4 2.mp4 --sout “#gather:std{access=file,dst=join.mp4}” --sout-keep

 

#Step 3:

VLC opens and joins the files together. The process is carried out discreetly, so you won’t see anything appear on the screen. You now have to shut VLC down again before the new file (in our case, called ‘join’) is properly finished. If you look at it before closing VLC, it will appear to be an empty file.

 

#Step 4:

The file’s thumbnail appears. You can reopen VLC and play the video as normal. If you want to watch any changes to the file, such as adding more clips, make sure you rename the output file in Step 2, so it doesn’t overwrite your existing file.

 

#Step 5:

You may feel your video is a bit boring and decide to spice it up with a few video effects. If you do this as you record your clips above, you can insert them into your finished product. Click the ‘Show extended settings’ button and click the Video Effects tab.

 

#Step 6:

There are plenty of effects to experiment with, such as changing the color of your video from the Colors tab. Here, we’ve chosen a Sepia tint. The Essential tab has subtler color changes, Geometry lets you rotate the video and Overlay can insert a logo or text.  

Time Analysis of Recursive Program | Back Substitution Method

Back Substitution method

 

Let’s understand the time complexity of a recursive function with some examples:

 

Example:
 int test(int n)  
 {  
   if(n > 20)  
    return test(n/2) + test(n/2); //recursive call  
 }  


For solving the test(int n), let's say that time taken is T(n). In the above function, “if-condition” will take some constant time then we gonna calculate two tests (n/2) and summing it up. So, there are some constant terms involving “if-condition” and for the addition operation in the recursive call.

 

T(n) = c + 2T(n/2)

This is how we should write a recursive function and then we should try solving the recursive function.


Back Substitution method. 

There are many ways to solve the recursive function, one of the ways are: Back Substitution method.


 //Example 1:  
 int test(int n)  
 {  
   if(n > 1)   //base condition  
    return test(n-1);  //recursive call  
 }  
 //Time Complexity = O(n)   

 

If we assume that the time taken for the test(int n) is T(n) then, the time is actually some constant term for comparison, and after that time is taken to solve the problem on (n-1) inputs.

 

T(n) = 1 + T(n-1) ; when n>1 --------> (1)

        = 1                ; when n=1

We represent the constant term using 1 or c.

 

Back substitution can be applied to any of the problems but it is slow.

T(n-1) = 1+T(n-2) -------->(2)

T(n-2) = 1+T(n-3) -------->(3)

 

Substituting eq(2) in (1);

T(n) = 1+1+T(n-2)

T(n) = 2+T(n-2) -------->(4)

 

Substituting eq(3) in (4)

T(n) = 2+1+T(n-3)

T(n) = 3+T(n-3)

   -

   -

   -

   -

T(n) = k+T(n-k) -------->(5)

Checking the base case of the given algorithm, we find that,

T(n) = 1+T(n-1) ;valid when n>1

n is going to start from a very large number and gonna gradually decrease and at some point, n will be 1, so whenever it reaches 1, we’ll stop.

T(n) = k+T(n-k), This will get eliminated when there will be T(1) then.

n-k = 1

K = n-1

 

Putting the value of k in eq (5),

=(n-1)+T(n-(n-1))

=(n-1)+T(1)

=(n-1)+1           because T(1)=1

=n

 

Therefore, T(n) = n = O(n)


Example 2: Try it yourself.

T(n) = n+T(n-1) ; when n>1

        = 1              ; when n=1

Answer: Time complexity will be O(n^2).

Time complexity of Iterative programs.



About graph: f(n) is the actual time taken by the Algorithm, but in practice, we say it the time taken by the program to exist but when you write it into a program and execute it, we found out that this is not the real-time, it is just an approximation. It means, if f(n) increases for the algorithm, then the program time increases if f(n) decreases program time decrease. 


To find out f(n), we need to know that there are 2 types of algorithm:

Iterative: Here there is no function calling and having for loops and all, then it is iterative.


Recursive: Here there is a function calling itself then it is called recursion.


Any program that can be written using iteration could be written using recursion and any recursion program can be converted into an iteration. So both are equivalent in power. But if we go through analysis, both are different:


In order to analyze an iterative program, we need to count the number of times a loop is getting executed. Whereas, if we have to find out the time taken by the recursive program, we use recursive equations which means, we write a function of in terms of n/2

A(n)->f(n).

A(n)->f(n/2) 


In case the algorithm does not contain Iteration or Recursion means there’s no depending on running time on the I/P size, means whatever is the input size, the running time is going to be a constant value.


So if there’s no Iteration or Recursion in the algorithm, we need not worry about the time, it will be constant for such program we write the order of 1 O(1) which represents constant time.   


Examples:  

 //Example 1:  
 int timecomp(int n)  
 {  
   int i;  
   for(i=0; i<n; i++)  
     printf("RavelingTech"); //this line will be printed n times  
 }  
 //Therefore, the time complexity of the algorithm is O(n).  
 
//Example 2:  
 int timecomp(int n)  
 {  
   int i,j;  
   for(i=0; i<n; i++)  
   {  
     for(j=0; j<n; j++)  
       printf("RavelingTech"); //this line will printed nxn times  
   }  
 }  
 //Therefore, the time complexity of the algorithm is O(n^2).  
 
//Example 3:   
 int timecomp(int n)  
 {  
   int i=1, s=1;  
   while(s <= n)  
   {  
     i++;   //increment in i is linear  
     s=s+i;  //increment in s depends on i  
     printf("RavelingTech");  
   }  
 }  
 /*  
 s | 1 3 6 10 15 21 ........n  
 i | 1 2 3 4 5 6 ........k  
 By the time i reaches to k, s will be the sum of 1st k natural number  
   = k(k+1)/2  
 Now, if the loop has to stop , then  
 k(k+1)/2 > n  
 k = O(√n) <--- Time Complexity.  
 */  

How To Apply Dark Mode to all websites in Edge Browser.

DarkMode

The new Chromium Edge browser is packed with useful new features and some of the edge’s features are tucked away below the bonnet which you can enable through Edge flags settings.

One of the interesting features that you can enable from Edge flags settings in dark mode for web content.

I have already explained how to activate Edge’s dark mode, but this just changes the color of the browser’s interface and doesn’t have any effect on the web pages you visit.

To read the web content in dark mode, type edge://flags in the address bar and search for "dark" in the Search Flags box.

Dark Mode Edge Browser

Click on the drop-down next to ‘Force Dark Mode for Web Contents’, then change this to Enable and Restart your browser when prompted.

Edge Browser Dark Mode

Now your Edge browser is ready to load all web content in dark mode and later if you want you can go through the same settings to disable it. 20 Best Features of Chromium Edge Browser. 

Discard Inactive tabs automatically in Google Chrome.

Auto Tab Discard

Auto Tab Discard solves everyone’s biggest moan about Chrome - by automatically ‘killing’ unused tabs, it claws back much-needed memory. This should speed up your browser and save battery life when you’re using a laptop.

Features of Auto Tab Discard.
  • It speeds up the browser and minimizes memory usage.
  • It designates specific tabs to be whitelisted to prevent discarding.
  • You can retain discarded tabs after closing and re-opening your browser.
  • The favicon of a website displays the discarded state.


Click the extension’s toolbar button for a range of quick settings that let you swiftly discard the current tab or any other tab you may have open, in any Chrome window.

Your tabs won’t suddenly disappear- instead, the browser tool puts a discarded tab into a suspended state until you click back into it, at which point it will reload. You can also jump between current tabs, close them using the navigation arrows or order all tabs to remain open during your session.

             
However, it’s in the add-on’s settings where the ‘auto’ part of its name occurs. Here, you can set a time limit that kicks in when you have a specific number of tabs open. 

What is Computer Programming? Basic.

Programming

Dictionary Definition: Programming is the process of preparing an instructional program for a device.

But that’s a really confusing definition, so in layman’s terms what exactly does that mean? Essentially, it is attempting to get a computer to complete a specific task without mistakes.

Just, for example, you instruct your less than intelligent friend to build a Lego set. He lost the instructions so now he can only build based on your commands. Your friend is far from competent on his own and so you must have to give him EXACT instructions on how to build, even if there is one piece wrong the entire Lego set will be ruined.

Giving instructions to your friend is very similar to how programmers code.

An important thing to note is that computers are actually very dumb. We build them up to be this super-sophisticated piece of technology when in actuality a computer’s main functionality comes from how we manipulate it to serve our needs.

{"Computers are only smart because we program them to be"};

The language that Computer Understand.

Programming isn’t a simple as giving instructions to your friend since, in the case of programming, the computer doesn’t speak the same language as you. The computer only understands machine code, which is a numerical language known as a binary that is designed so that the computer can quickly read it and carry out its instructions.

Every instruction fed to the computer is converted into a string of 1’s and 0’s and then interpreted by the computer to carry out a task. Therefore, in order to talk to the computer, you must first translate your English instruction to Binary.

Directly translating what you want the computer to do into machine code is extremely difficult, in fact almost impossible and would take a very long time to do if you could. This is where programming languages come into play.

Programming languages are fundamentally a middle man for translating a program into machine code-the series of 0’s and 1’s that the computer can understand. These languages are much easier for humans to learn than machine code, and are thus very useful for programmers.

{"A programming language is not English and not machine code, it is somewhere in the middle"};

How Programming Language Vary?

There are many different programming languages out there that each has its own unique uses.
Programming

  • Java and Python: General Purpose languages.
  • HTML/CSS: Designed for specific tasks like web page design.


Each language also varies in how powerful it is:
  • JavaScript is a scripting language and isn’t used for big problems.
  • Java and Python can carry out a much more computationally taxing process.


We measure a programming language’s power level by how similar it is to machine code. Low-level programming languages such as Assembly or C are closer to binary than a high-level programming language such as Java or Python.

The basic idea is that the lower the level of your programming language, the more your code will resemble what the machine can interpret as instructions.

So, try different languages and decide which one’s rules, interface, and level of specification you like the best.  

If you like this post and find it useful then you can show your support by donating a small amount from your heart. You can also show your support by following us on Facebook and Twitter.

DON'T MISS

Nature, Health, Fitness
© all rights reserved
made with by templateszoo