Wednesday, May 11, 2016

Applications of Machine Learning for private cloud operations 
The following are some use cases for building smart web applications for a private cloud provider.  
Use case 1) Making recommendations 
Customers often have a variety of choices when they come to request resources from a private cloud. One way to help them would be to tell them what others like them have been leasing from the cloud provider. If we search a large group of people and smaller set with tastes similar to a customer in terms of what they have been liking or borrowing, then we can make a ranked list of suggestions by finding the people who are similar and combining their choices to make a list. 
Different people and their preferences can be represented as a nested dictionary. To find similarity among people, we could use some sort of similarity measures based on Euclidean distance or Pearson correlation. We can then score the items by producing a weighted score that ranks the participants. 
Use case 2) Discovering groups 
Customers can be pigeonholed by clustering and categorizing them based on their requests.  By determining the frequency of a certain type of resource in the requests made by the customers, we may be able to find customers who are similar in their needs or have similar planning. Such a result could be very useful in searching, cataloging and discovering the themes in the vast number of adhoc requests made over time. 
We can employ hierarchical clustering or K-means clustering to categorize the requests and relate personas to this shopping pattern. 
Use case 3) Searching and Ranking 
Searching and Ranking form the core of analytics for a customer when she wants to filter through support documents and literature. Very often customers will get a buzzword to search for and help themselves but they might not know the site layout or the categories to walk down to filter it. 
They can be helped with a page ranking that gives a weighted score based on the fraction of in-references to out references. Other ways of arranging them or finding results based on clustering can also help. 
#codingexercise 
Determine if three points are on a line
bool onSegment(Point p, Point q, Point r)
{
// q is on p r
if (q.x <= max(p.x,r.x)  && q.x >= min(p.x, r.x) &&
     q.y <= max(p.y, r.y) && q.y >= min(p.y, r.y))
{
 return true;
}
return false;
}

Determine if three points are oriented clock wise (1) or anti clockwise(2)
int orientation(Point p, Point q, Point r)
{
int val = (q.y-p.y)*(r.x-q.x) -
                (q.x-p.x)*(r.y-p.y);
if (val == 0) return 0;
return (val > 0) ? 1: 2;
}

Determine if two line segments intersect
bool intersect(Point p1, Point q1, Point p2, Point q2)
{
//  (p1,q1,p2) and (p1,q1,q2) have different orientations
and (p2,q2,p1) and (p2,q2,p1) have different orientations
// and they are all collienar and one point lies on the segment of the other two
}

Find the squares of the sides using distances (x2-x1)^2+ (y2-y1)^2
Lets call them a-sq, b-sq and c-sq, 
then if two of the squares add up to the third - it is right triangle
if two of the squares are greater than the third no matter which two are picked it is acute
else obtuse.

No comments:

Post a Comment