Take BTech Tuition from the Best Tutors
Search in
Lesson Posted on 14/09/2023 Learn BTech Computer Science Engineering
Prime Card
With 27 years of experience in the field of computer science, I bring a wealth of knowledge and expertise...
This is the age of “big data.” Once upon a time, only companies had raw data. There used to be servers where that data was stored and processed. First with the arrival of personal computers followed by the
massive use of wireless communications, we all became generator of data. Each time we buy a product, each time we rent a movie, browse a web page, create a blog, or publish on the social media, even when we just walk or drive around, we are producing data. Each of us is not only a producer but also a consumer of data. We want specialized products and services for us. We want our requirements to
be analysed and modelled to be predicted. Think, for example, of a supermarket chain that is selling thousands of goods to millions of customers either at hundreds of brick-and-mortar stores all over a country or through a virtual store over the web. The details of each transaction are stored: date, customer id, goods bought and their amount, total money spent, and so forth. This typically amounts to a lot of data every day. What the supermarket chain wants is to be able to predict which customer is likely to buy which product, to maximize sales and profit. Similarly each customer wants to find the set of products best matching his/her needs. This task is not evident. We do not know exactly which people are likely to buy this ice cream flavor or the next book of this author, see this new movie, visit this city, or click this link. Customer behavior changes in time and by geographic location. But we know that it is not completely
random. People do not go to supermarkets and buy things at random. When they buy beer, they buy chips; they buy ice cream in summer and spices for Glühwein in winter. There are certain patterns in the data. To solve a problem on a computer, we need an algorithm. An algorithm is a sequence of instructions that should be carried out to transform the input to output. For example, one can devise an algorithm for sorting. The input is a set of numbers and the output is their ordered list. For the same task, there may be various algorithms and we may be interested in finding the most efficient one, requiring the least number of instructions or memory or both. For some tasks, however, we do not have an algorithm. Predicting customer behavior is one; another is to tell spam emails from legitimate ones. We know what the input is: an email document that in the simplest case is a file of characters. We know what the output should be: a
yes/no output indicating whether the message is spam or not. But we do not know how to transform the input to the output. What is considered spam changes in time and from individual to individual. What we lack in knowledge, we make up for in data. We can easily compile thousands of example messages, some of which we know to be spam and some of which are not, and what we want is to “learn” what constitutes spam from them. In other words, we would like the computer (machine) to extract automatically the algorithm for this task. There is no need to learn to sort numbers since we already have algorithms for that, but there are many applications for which we do not have an algorithm but have lots of data. We may not be able to identify the process completely, but we believe, we can construct a good and useful approximation. That approximation may not explain everything, but may still be able to account for some part of the data. We believe that though identifying the complete process may not be possible, we can still detect certain patterns or regularities. This is the niche of machine learning. Such patterns may help us understand the process, or we can use those patterns to make predictions: Assuming that the future, at least the near future, will not be much different from the past when the sample data was collected, the future predictions can also be expected to be right. Application of machine learning methods to large databases is called data mining. The analogy is that a large volume of earth and raw material is extracted from a mine, which when processed leads to a small amount of very precious material; similarly, in data mining, a large volume of data is processed to construct a simple model with valuable use, for example, having high predictive accuracy. Its application areas are abundant: In addition to retail, in finance banks analyze their past data to build models to use in credit applications, fraud detection, and the stock market. In manufacturing, learning models are used for optimization, control, and troubleshooting. In medicine, learning programs are used for medical diagnosis. In telecommunications, call patterns are analyzed for network optimization and maximizing the quality of service. In science, large amounts of data in physics, astronomy, and biology can only be analyzed fast enough by computers. The World Wide Web is huge; it is constantly growing, and searching for relevant information cannot be done manually. But machine learning is not just a database problem; it is also a part of artificial intelligence. To be intelligent, a system that is in a changing environment should have the ability to learn. If the system can learn and adapt to such changes, the system designer need not foresee and provide solutions for all possible situations.
Machine learning also helps us find solutions to many problems in vision, speech recognition, and robotics. Let us take the example of recognizing faces: This is a task we do effortlessly; every day we recognize
family members and friends by looking at their faces or from their photographs, despite differences in pose, lighting, hair style, and so forth. But we do it unconsciously and are unable to explain how we do it. Because we are not able to explain our expertise, we cannot write the computer program. At the same time, we know that a face image is not just a random collection of pixels; a face has structure. It is symmetric. There are the eyes, the nose, the mouth, located in certain places on the face. Each person’s face is a pattern composed of a particular combination of these. By analyzing sample face images of a person, a learning program captures the pattern specific to that person and then recognizes by checking for this pattern in a given image. This is one example of pattern recognition.
Machine learning is programming computers to optimize a performance criterion using example data or past experience. We have a model defined up to some parameters, and learning is the execution of a computer program to optimize the parameters of the model using the training data or past experience. The model may be predictive to make predictions in the future, or descriptive to gain knowledge from data, or both. Machine learning uses the theory of statistics in building mathematical models, because the core task is making inference from a sample. The role of computer science is twofold: First, in training, we need efficient algorithms to solve the optimization problem, as well as to store and process the massive amount of data we generally have. Second, once a model is learned, its representation and algorithmic solution for inference needs to be efficient as well. In certain applications, the efficiency of the learning or inference algorithm, namely, its space and time complexity, may be as important as its predictive accuracy.
Lesson Posted on 01/06/2021 Learn BTech Computer Science Engineering
Lets Talk About Software Design-patterns
Abhinaw Tripathi
I am a working professional and having around 12 year's of experience as a software engineer. And at...
What are Design Patterns?
Design Pattern is a used and tested solution for a known problem. In simple words, you can say a general reusable solution to a commonly occurring problem within a given context in software design.
Why Design Patterns?
Because good software design requires considering issues that may not become visible until later in the implementation.
It prevents issues that can cause a significant problem in the software and also improves the code readability.
Different types of Design pattern by GOF(Gang of Four):
Again they have also categorised into different types, such as:
Creational Design Pattern, DP = Design Pattern
Structural Design Pattern:
Behavioural Design Pattern:
Is it necessary to use design pattern always? No, because we should not try to force the code into a specific way; instead, notice which practices crystallise out of your code. I mean, writing a program that does X using the pattern Y is not a good idea.
The question is, when did you start doing everything using patterns? Not all solution fit neatly into an existing design pattern, and adopting a practice may mean that you muddy the cleanness of your solution.
What is the difference between Design-Pattern and Framework?
To be continued.
read less
Lesson Posted on 18/11/2020 Learn BTech Computer Science Engineering
Spring - Dependency Injection (DI)
Gaurav Kothari
I am having 8+ years of IT experience in full stack development of java applications. I am B.Tech from...
Spring - Dependency Injection (DI)
DI is a framework which provides loose coupling in code. Here loose coupling means no hard coding of the object. Instead of hard coding, we will be injecting these object from some configurations (XML based, java based, annotation-based).
DI is nothing but design patterns which give you the lightweight loosely couple enterprise application in the result.
What is an injection? -- Inserting of an object/ value into a class whenever the help requires it of third party configurations.
There is two way of achieving Dependency Injection:
Constructor Injection: Injecting any object/ value through the constructor of a class. For, e.g., I have a Test class with the parameterized constructor in it, and I am initializing parameter of that constructor from the external source, i.e. XML file. See how
public class Test {
private int id;
public Test(int id) {
this.id = id;
}
}
XML configuration file: //here now 100 will be assigned to the id of Test class
Setter method Injection: Injecting any object/ value through the setter method of a class. For, e.g., I have a Test class with setter method in it, and I am initializing parameter of that setter method from the external source, i.e. XML file. See how
public class Test {
private int id;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
}
XML configuration file: //here now 100 will be assigned to the id of Test class
Please add on comments and like this lesson, if it gave you some revision or refreshment on Spring - Dependency Injection (DI) concepts.
read lessTake BTech Tuition from the Best Tutors
Lesson Posted on 16/11/2020 Learn BTech Computer Science Engineering
Balaji
#include <stdio.h>
#include <stdlib.h>
struct node
{
int element;
struct node *left;
struct node *right;
};
struct node *root = NULL;
struct node *insert(struct node *root,struct node *newnode)
{
if(root == NULL)
{
root = newnode;
}
else
{
if(newnode->element < root->element)
{
if (root->left == NULL)
root->left = newnode;
else
insert(root->left,newnode);
}
else if(newnode->element > root->element)
{
if(root->right == NULL)
root->right = newnode;
else
insert(root->right,newnode);
}
else
printf("\n\t Element already exists \n\n");
}
return root;
}
void find(int val,struct node *root)
{
if(root == NULL)
printf("\n\n\t\tElement not found");
else
{
if(val<root->element)
find(val,root->left);
else if(val>root->element)
find(val,root->right);
else
printf("\n\n\tElement Found");
}
}
void preorder(struct node *root)
{
if(root != NULL)
{
printf("%d --> ",root->element);
preorder(root->left);
preorder(root->right);
}
}
void inorder(struct node *root)
{
if(root!= NULL)
{
inorder(root->left);
printf("%d --> ",root->element);
inorder(root->right);
}
}
void postorder(struct node *root)
{
if(root != NULL)
{
postorder(root->left);
postorder(root->right);
printf("%d --> ",root->element);
}
}
int main()
{
int ch,val;
struct node *newnode;
do
{
printf("\n\n\t\t Binary Search Tree \n");
printf("\n\t<1> Insertion");
printf("\n\t<2> Traversal Techniques");
printf("\n\t<3> Search");
printf("\n\t<4> Exit");
printf("\n\t Enter Your Choice: ");
scanf("%d",&ch);
switch(ch)
{
case 1:
printf("\n\n\tInserting Element : ");
scanf("%d",&val);
newnode = (struct node *)malloc(sizeof(struct node));
newnode->element = val;
newnode->left = NULL;
newnode->right = NULL;
root = insert(root,newnode);
printf("\n\n\tInorder : ");
inorder(root);
break;
case 2:
if(root == NULL)
printf("\n\tEmpty tree ");
else
{
printf("\n\n\tInorder Traversal : ");
inorder(root);
printf("\n\n\tPreorder Traversal : ");
preorder(root);
printf("\n\n\tPostorder Traversal : ");
postorder(root);
}
break;
case 3:
printf("\n\n\tSearch Element : ");
scanf("%d",&val);
find(val,root);
break;
case 4:exit(0);
default: printf("\n\t Invalid Choice\n\n");
break;
}
}while(ch!= 4);
return 0;
}
read less
Lesson Posted on 16/11/2020 Learn BTech Computer Science Engineering
Balaji
#include <stdio.h>
#include <stdlib.h>
#define MAX 5
char a[MAX];
int front = 0, rear = -1, count = 0;
void insert()
{
char item;
if(count==MAX)
{
printf("\n\t\tCircular Queue Overflow");
return;
}
else
{
printf("\n\t Enter the Element: ");
scanf("%s",&item);
rear=(rear+1)%MAX;
a[rear] = item;
count = count + 1;
}
}
void del()
{
char item;
if(count == 0)
{
printf("\n\t\tCircular Queue Underflow");
return;
}
else
{
item = a[front];
front = (front+1)%MAX;
count = count - 1;
printf("\n\tDeleted Item = %c",item);
}
}
void display()
{
int i,j=front;
if(count == 0)
{
printf("\n\t\tCircular Queue is Empty");
return;
}
else
{
printf("\n\tFront = %d Rear = %d Count = %d\n",front,rear,count);
printf("\n\tCircular Queue Elements are: \n\n");
for(i=1;i<=count;i++)
{
printf("\t%d",j);
j = (j+1)%MAX;
}
printf("\n");
j = front;
for(i=1;i<=count;i++)
{
printf("\t%c",a[j]);
j = (j+1)%MAX;
}
}
}
int main()
{
int ch;
do
{
printf("\n\n\t\tCircular Queue\n\n");
printf("\t<1> Insert\n");
printf("\t<2> Delete\n");
printf("\t<3> Display\n");
printf("\t<4> Exit\n\n");
printf("\t Enter Your Choice: ");
scanf("%d",&ch);
switch(ch)
{
case 1: insert();
display();
break;
case 2: del();
display();
break;
case 3: display();
break;
case 4: exit(0);
default: printf("\n\tInvalid Choice") ;
break;
}
} while(ch!=5);
return 0;
read lessLesson Posted on 04/08/2020 Learn BTech Computer Science Engineering
Manoj Singh
I am a experienced, passionate, dedicated teacher and tutor with over 12 years of experience in teaching,...
C programming language was developed in 1972 by Dennis Ritchie at AT&T Bell Labs.
It was developed to overcome the problems of languages such as B, BPCL.
It was developed to write the Unix operating system. The Unix OS was written entirely in C.
The language was formalized in 1988 by ANSI.
C is the most widely used and popular system programming language.
Microsoft's Windows kernel is mostly written in C language.
Linux OS is also written in C language, with some parts in Assembly.
Mac computers are also powered by C.
The world's most popular databases, including Oracle, MySQL, PostgreSQL, SQL Server are coded in C and C++.
read lessTake BTech Tuition from the Best Tutors
Lesson Posted on 02/08/2020 Learn BTech Computer Science Engineering
Parul Rajput
I am an assistant professor in computer science & engineering department since 2015. I am completed m.Tech...
A Program to print 2 integer value.
#include<stdio.h>
#include<conio.h>
main()
int a,b,add;
a=5;
b=3;
add=a+b;
printf(“ Addition=%d”,&add);
getch();
Brief description of above program,
#include: it includes library function/import predefine libraries.
<stdio.h>: standard input output header file.
main(): it is first function of C programming. Every C programme must have main() function.
int a,b,add: a,b,add are declared as integer(int) type variables.
add=a+b: this statement sum a and b and store result in add variable.
printf: printf is a function to print output.
getch(): also a function, it is used to return program window to console.
read lessLesson Posted on 07/03/2020 Learn BTech Computer Science Engineering
Compiling C program on Linux machine GCC ,GDB
Narasimha
Linux have powerful tool called "Terminal".
From "terminal" we can command the machine.
For any programming language the required tools are editor, compiler and debugger.
Compiler will check the syntax errors and debugger is helpful while debugging/tracing the problem in source code.
The most popular tools in Linux for the above-mentioned are
1)vim - editor (for writing c source code)
2)GCC - compiler ( for compiling c file)
3) GDB - debugger ( tracing the issues in code)
Below are the command for installing these tools
$ sudo apt-get install vim
$sudo apt-get install gcc
$ sudo apt-get install gdb
read less
Answered on 23/08/2017 Learn BTech Computer Science Engineering
C L Kumar
Maths Tutor
Take BTech Tuition from the Best Tutors
Answered on 07/11/2019 Learn BTech Computer Science Engineering
Abraham Paul
Computer Science Teacher & Educational Coach
UrbanPro.com helps you to connect with the best BTech Tuition in India. Post Your Requirement today and get connected.
Ask a Question
The best tutors for BTech Tuition Classes are on UrbanPro
The best Tutors for BTech Tuition Classes are on UrbanPro