Make machine learning model predictions with Mind Foundry

Hello dashdash Community! :wave:

With the Predict churn with Mind Foundry template, you can now make machine learning model predictions in dashdash!

What is Mind Foundry Analyze?

Mind Foundry Analyze can help you build a predictive machine learning model to predict future outcomes using past data. You do not need to be a data scientist, you simply need to understand your business problem and your data. Analyze will guide you through the process of creating a model and tell you how effective it is. You may use this template with any classification or regression model to get live predictions.

How it works

1. Register a client API in Analyze

  • If you haven’t done so already, publish your Analyze model as an API. You can do this directly from within the model or from the API section, accessible via the left-hand navigation bar.

  • Register a client for your dashdash spreadsheet from the API page. Give the client a useful name, such as “dashdash”, then copy the endpoint URL, Client ID, and Client Secret using the controls highlighted. Keep these credentials safe as you will need them in the next step.

2. Enter your Mind Foundry model credentials

  • Head to the Model API view in dashdash and enter the details from the previous step into B1:B3.
  • Turn on the model by checking the box in B4. The spreadsheet cells further down should start to auto-populate using information from your model.
  • If this does not happen correctly, double-check if you’ve pasted the API credentials into the right cells.

3. Explore your model predictions

  • Navigate to the “Model Explorer” view. The view will be automatically updated to match your model.
  • The set of features will be listed in column A. Column C will show you the type of data expected for the feature. If the feature is categorical, then column D will list the possible values. If special formatting is required, for instance for dates and times, then column E will describe the formatting, and column F will give an example.
  • Enter your feature values in column B and then press the “Predict” button in cell B1. After a few seconds, the prediction will appear in E2.
  • You can change the feature value and press “Predict” again to explore how the prediction changes.
  • If you encounter a problem, then you may find some context in the Model API view. Most likely there is an invalid or missing feature value.

4. Make bulk predictions

  • Navigate to the “Bulk Predictions” view. The view will be automatically updated to match your model. The target name will be in A4, and the set of features will be listed starting from B4 onwards. Models with up to 100 features are supported.
  • Paste your feature values into the spreadsheet from row 5 downwards, under the correct feature names. Up to 100 records at a time are supported.
  • Press the “Predict” button in cell B1. After a few seconds, the prediction for each record will appear in column A.

Troubleshooting

If you are having problems getting predictions, this might be why:

1. Model Features Missing.
If the Model Explorer or Bulk Predictions views have not been updated to show the model features, or they are not what you expected, then the endpoint URL might be wrong. Head back to the Model API page in Analyze and copy the endpoint URL again, then paste it into dashdash.

2. Not Authorized.
Predictions will fail if your API credentials are invalid. The Authentication Token value in cell B5 of the Model API view should begin with “Bearer”, followed by a long sequence of encrypted data. If not, then there has been an authentication failure. Most likely, the Client ID and Client Secret values mixed up or incorrect. Go back to the model API page in Analyze, delete the previously registered client, register a new client, and use the new credentials.

3. Invalid Data.
If the model has updated correctly and the authentication token looks valid but you still cannot get a prediction returned in a reasonable time, then it’s most likely because of invalid data. There is probably a mistake in the data you have entered. To find out what the error is, navigate to the Model API view and use the JSON explorer to examine the API request and response body data items. In the example below you can see that the API has returned an error, indicating that there is an issue with the “number vmail messages” feature. It was expecting an integer value. A letter “o” had been typed in error.

:point_right:If you are still experiencing problems, then email Mind Foundry support at support@mindfoundry.ai.

3 Likes