Copyright © infotec016 . Powered by Blogger.

Wednesday, November 27, 2019

Machine - learning methods


Classification learning

classification learning is supervised.(Predicting a discrete class)
label is provided with actual outcome.


Association learning

detecting association between features.
it can be applied if no class is specified and any kind of structure is considered as "interesting".

Clustering

Finding group of items that are similar.
It is unsupervised


Numeric prediction

Variant of classification learning where class is numeric

Saturday, November 23, 2019

Wednesday, November 13, 2019

NLP- Natural Language Processing


Natural Language Processing is the technology used to aid computers to understand the human’s natural language.

Different level of analysis for natural language

Prosody: Deals with rhythm and intuition of the language
Phonology: Examined the sound that are combined to from language
Morphology: Concern with the components that make up words 
Syntax: Studies the rules for combining words into legal phrases and sentences
Semantics: Consider the meaning of words
Pragmatics: Study of the ways in which the language is used and its effects on the listener
World knowledge: Include the knowledge of the physical world, interaction and intention in communication

Specification and Parsing using Context-Free Grammar


Phrase structure plays an essential role in semantic interpretation by defining intermediate stages in a derivation at which semantic processing may take place.

Parsing algorithm has 2 types:
 Top-down Parser:
     It begins with a top-level Sentence symbol and expand the tree whose leaves match the target sentence.
 Bottom-up Parser:
     It begins with the word symbols (terminal) attempt to find a series of reductions that leads to the Sentence Symbol.

Sample grammar rules

Sentence <-> noun_phrase verb_phrase
noun_phrase <-> noun
noun_phrase <-> article noun
verb_phrase <-> verb
verb_phrase <-> verb noun_phrase
prep_phrase <-> preposition noun_phrase
noun_phrase <-> noun_phrase prep_phrase
verb_phrase <-> verb prep_phrase
article <-> a/ the
noun <-> cat/ Mango
verb <-> eat/ like
preposition <-> on

Tuesday, November 12, 2019

Red Black Tree


Rules


  • Self-balancing Binary Search Tree
  • The node color can be either red or black (It is possible to have all black nodes but impossible to have all red nodes)
  • The root node must be black
  • There is no two red adjacent nodes (It will not have a parent and a child node in red color)
  • NULL node is always black
  • Every path from root to NULL node should have the same number of black nodes


Insertion


  • If tree is empty, create a root node with black color
  • If tree node is not empty, create a new child node as leaf node with red color
  • If parent of new node is black then do nothing 
  • If parent of new node is red then check the color of parent's sibling of new node (uncle of new node)
    •      If the sibling node is black or NULL then do suitable rotation and re-color 
    •      If the sibling node is red then re-color and check grand parent of new node
      •         If grand parent is root then do nothing
      •         else change the color of grand parent node and recheck 

Deletion


Sunday, November 10, 2019

Saturday, November 9, 2019

Git Commands


To find git version
>> git --version

Initialize a new repository and push
>> git init <repo_name>

Create your files to upload  to the repository created in your machine

To see the status.. It will show the modified files in the directory
>> git status

To add the file
>> git add <file_name>

To commit
>> git commit -m "leave your commit message here"

To see the branch
>> git branch

Add the upstream
>> git remote add upstream <repo_url>

Fetch the changes from upstream to your local repository
>> git fetch upstream master

To push
>> git push

To clone a existing repository in your local machine
>>git clone <repo_url>

To remove a file
>> git rm <file_name>