Wednesday, March 18, 2015

SharePoint 2013 People Search REST Call

You can find the whole API reference for Search REST API here. But when you have to do People Search then you need to put the context around your search Query and it will look like as follows:

Normal Search REST Call:
http://www.sharepointblue.com/SearchCenter/_api/search/query?querytext='*'

People Search REST Call: 
http://www.sharepointblue.com/SearchCenter/_api/search/query?querytext='*'&sourceid='b09a7990-05ea-4af9-81ef-edfab16c4e31'

Note: Before firing the People Search request, make sure User Profiles are crawlled inside the SharePoint by crawling: sps3://My_Site_host_URL

Ref: https://msdn.microsoft.com/en-us/library/office/jj163876.aspx

Monday, March 16, 2015

Predictive Analytics with AzureML

I started exploring AzureML(Azure Machine Learning) few weeks back and quickly fell in love with its simplicity and robustness.

I grabbed the sample data of Down Jones Index from UC Irvine Machine Learning Repository and applied the Linear Regression algorithm to create a prediction model to estimate the future values of Microsoft stock's opening weekly price (so that I can be rich) and here how my model looks like in AzureML.


First I am removing the entire rows with missing values from the data. Then I am applying the filter for MSFT symbol in the first split and I am dividing the data to 80-20 ratio to train the actual model on 80% of the data with the help of Linear Regression algorithm. After that I am trying to predict price variable in Train Model and verifying it using 20% of remaining data. In the last, I am evaluating the model that how effective and reliable it is.

At this point I need to seriously improve my model using other algorithms, removing/adding new variables etc because the Coefficient of Determination is nowhere closer to 1 and Mean Absolute Error, Root Mean Squared Error, Relative Absolute Error Relative Squared Error are very high. But that's how a prediction model (more or less) will eventually look like in AzureML. It can be published as a web service with few clicks.

I have published this experiment/source to AzureML gallery and can be accessed here:

https://gallery.azureml.net/Details/3f4d92649bfa4fa3bf4b0c93a3635227

My next step would be to grab data from SharePoint lists and apply some prediction algos on it.