I built a linear regression algorithm in Azure ML. On the "Score Model" module I can actually see the predictions and the rest of the features. However, when I deploy this project as a web service, the service is expecting the actual label of the data (e.g. I'm trying to predict a house's price and it asks me for the price of the house to make the prediction), which doesn't make any sense to me... What am I doing wrong? On the "Train Model" module I set that the label column is the HousePrice, which is what I'm trying to predict...
This is my model:
I tried leaving that field blank but the prediction returns null...
The input schema (names/types of required input) based on the location in the graph where you attach the "Web Service Input" module. To get the schema you want, you will need to find -- or if necessary, create -- a place in the experiment where the data has the column names/types you desire.
Consider this simple example experiment that predicts whether a field called "income" will be above or below $50k/year:
When we click "Set up web service", the following graph is automatically generated:
Since the input dataset and "Web service input" modules are connected to the same port, the web service schema will perfectly match the schema of the input dataset. This is unfortunate because the input dataset contains a column called "income", which is what our web service is supposed to predict -- this is equivalent to the problem that you are having.
To get around it, we need to create a place in our experiment graph where we've dropped the unneeded "income" field from the input dataset, and attach the "Web service input" module there:
With this arrangement, the web service only requests the features actually needed to score the model. I'm sure you can use a similar method to create a predictive experiment with whatever input schema you need for your own work.
Related
I have integer values as test cases(ids of different users), and I don't want to hardcode them, I have a method that gets users from API. It is said in specs, that dynamic test cases spec is not implemented yet. Is it possible to load test cases before test is executed?
We have used the term "dynamic test cases" to mean that the tests are not created before the run but during it. Specifically, the test cases can change while the test is running.
It doesn't sound like this is what you need. If I understand correctly, you want to get the user ids programmatically at the time the tests are created. You can easily do this using the TestCaseSourceAttribute on a method that uses your API to get the user id.
I have created an experiment to help categorise a description, this all works fine. However it does not tell me the weightings. When on the studio website I click test on the experiment and call the service I get back a JSON blob including lots of useful data such as the column names and weightings. When I actually use the web service from my app using C# the returned json does not include this information?
Any reason for this?
thanks
Andy
Make sure your score module used for the predictive experiment has "append score columns"checked
I'm not quite sure how to proceed. I have an ASP.NET MVC 5 web application that has identifiers in the URL as in the following:
/Controller/Action/XX0000001X/123456
Where XX0000001X and 123456 are identifiers to the record. Now, what I need to have happen is the web performance test not hard-code these in the test itself, because the next time it runs it will cause an issue, since these are generated everytime.
Is there a way to allow any value in the URL within Visual Studio web performance test?
Some ways of getting the values are:
You just know the values. So embed them in the URL, or save them in context parameters. Eg setting CP1 to XX0000001X and CP2 to 123456.
The values are provided in earlier responses. Use an extraction rule to get each value. Probably need two rules, saving to CP1 and CP2 There are several built-in rules but writing your own extraction rule is possible for more complex cases.
Several sets of values are known in advance of the test and each set of values should be used in one test. Data drive with these vales. See How to use a list of values for a parameter? for more details.
Some other code, perhaps in a plugin, generates the values and saves them to context parameters CP1 and CP2.
Having got the required values in context parameters just use them in the url. Set the url (or part of it) to be
Controller/Action/{{CP1}/{{CP2}}
Or, if the values come from a data source then the url should be in the style
Controller/Action/{{DataSource1.FileName#csv.FirstField}}/{{DataSource1.FileName#csv.SecondField}}
I am planning to build part of an internal dashboard around SSRS reports. I'm using ASP.net (framework 4), SQL Server 2008 R2, IIS6 and have built all my reports already in Report Builder 3.0.
Now it comes to pulling the reports through from the report server to the dashboard using the ReportViewer control. What I would like to do is to hide the SSRS report parameters and provide them myself from code behind, because the SSRS parameter selection controls are ugly (Windows 95 ugly) and don't fit with the look and feel of the site. Also, I have different end-user reports that are in fact the same report with different parameter selections (and I don't want to show these selection controls).
The issue is that all of my reports are VERY heavily parameterised - the business users want reports that are as flexible as pivots (you can imagine the fun I had building these reports). As a result I use a large number of shared datasets to provide the default and available values for each parameter. Since I intend to present these parameters myself in my web application, I need to know:
What the parameters are for each report (name and type)
What the default values should be for each parameter
What the available options should be for each parameter
I am happy to store the names/types of each parameter in a database table, but there would be far too many values to store to do the same with parameters (plus the data is too dynamic). Can anyone think of a solution?
In fact, it is quite easy to retrieve the Default and Available parameter values used in the report:
Once you have set the report source, ServerReport.GetParameters() returns a collection of ReportParameterInfo which, for each parameter, provides the data type, default/available values ("Values"/"Valid Values" respectively, where "Valid Values" are value/label pairs) and other useful attributes like a list of other parameters that depend on it.
So, just save default/available parameters in the report (using Report Builder / Report Manager) and use this to retrieve them in your code behind.
IS this what you're looking for: http://msdn.microsoft.com/en-us/library/ms155391.aspx ? I'm not quite clear what your issue is from your post, what exactly do you need help with in doing what you're trying to do?
I have an orchestration which is receiving messages from the message box of type XmlDocument. The messages have promoted properties and I am including the property schema in my project so that I may filter on them (a separate application is creating these messages). I am then assigning the untyped message to a typed message (I am not altering the name space) via a standard message assignment shape e.g.
MsgAgressoNewStarters = MsgXmldoc;
I am then outputting the message to a file location. However when I do this the property schema is also outputted.
How can I prevent this? I have tried filters etc.
Thanks
10th May 2012
I think I am possibly going about this the wrong way perhaps if I describe the full scenario you may be able to spot my deliberate mistake ;)
We are using BizTalk 2010.
I have a BizTalk application which talks to a 3rd party generic webservice that returns reports from one of our systems. This application is activated via the scheduled adapter which sends an XML document containing two values, the report name and the interface it is for. The web service returns the report as a string on a single XML node, this string in its self is an XML document. I then load this string into a message of type System.Xml.XmlDocument. There is no way of telling from the format of the data what report or for what interface this message is for. I need to send this message to the messagebox for it to be picked up by any number of related biztalk applications. So far I have tried creating a correlation set with the two values (from a property schema) & used that as the initialising correlation set on the send shape. I have then used the same property schema on another BT application to filter the message. This works but for some reason I get two messages, one being the XML which activities the orchestration which has the same fields as the property schema & correlation set. BizTalk doesn't seem to be able to tell the difference between them although they are structurally different and this is where my problem starts.
I am now thinking of creating a multipart message in the report application one part being the XmlDocument and the other being a header with the values I wish to route on.
Hope that makes some kind of sense.
I've actually now answered my own question, because both messages have the same properties I am inadvertently subscribing to both, d'oh!