• dsiebold
  • 10 Points
  • Member since 2011

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 6
This may simply just not be available yet, didn't see it in any of the doc surrounding training a model.  

You can specify what percentage of the dataset gets used for training with the remainder being used for testing.  Is there any mechanism to explicitly define a dataset to use for training and another dataset to be used for testing?  

It would seem like this would be valuable for tuning the model, having a static test data set to always test against while being able to modify the training dataset to increase the accuracy.
Is it possible to update trained dataset in einstein API?


I'm trying to set up a Lightning app that will allow a user to provide a url to a zip file, have that zip file loaded as a dataset into the predictive vision service, then specify the newly created dataset to be trained into a datamodel. I'm able to load the data model from the menu, and get back a dataset id.

But I'm stuck on how to call the training service. I modified the provided VisionController code as follows:

    public static String postDatasetTrain(string datasetId, string datasetName) {
        // Get a new token
        JWT jwt = new JWT('RS256');
        jwt.cert = 'SelfSignedCert_18Jul2016_235259';
        jwt.iss = 'developer.force.com';
        jwt.sub = 'joseph.daily@careerbuilder.com';
        jwt.aud = 'https://api.metamind.io/v1/oauth2/token';
        jwt.exp = '3600';
        String access_token = JWTBearerFlow.getAccessToken('https://api.metamind.io/v1/oauth2/token', jwt);      
        String VISION_API = 'https://api.metamind.io/v1/vision';
        String DATA_TRAIN = VISION_API + '/train';
        string contentType = HttpFormBuilder.GetContentType();
        //  Compose the form
        string form64 = '';      
        form64 += HttpFormBuilder.WriteBoundary();
        form64 += HttpFormBuilder.WriteBodyParameter('name', datasetName);
        form64 += HttpFormBuilder.WriteBoundary();
        form64 += HttpFormBuilder.WriteBodyParameter('datasetId', datasetId);        
        form64 += HttpFormBuilder.WriteBoundary(HttpFormBuilder.EndingType.CrLf);
        blob formBlob = EncodingUtil.base64Decode(form64);
        string contentLength = string.valueOf(formBlob.size());
        //  Compose the http request
        HttpRequest httpRequest = new HttpRequest();
        httpRequest.setHeader('Connection', 'keep-alive');
        httpRequest.setHeader('Content-Length', contentLength);
        httpRequest.setHeader('Content-Type', contentType);
        httpRequest.setHeader('Authorization','Bearer ' + access_token);
        Http http = new Http();
        HTTPResponse res = http.send(httpRequest);
        system.debug('res: ' + res);
        system.debug('res.getBody(): ' + res.getBody());
        return res.getBody();


But the response that comes back is always a 403 : forbidden message.

Is there anything obvious causing this in my code?

Hi I have tried to register using the http://www.developerforce.com/events/streaming_api_upgrade/registrations link but every time it takes me to different page.


Please can any one guide me how to get registered to use/enable the Streaming API.

  • December 30, 2011
  • Like
  • 0



I have setup data loader from command line as mentioned in this article.



I am  running into the issues. I do not understand what the below messages meant. can any one point me in the right direction.


Microsoft Windows [Version 6.1.7600]Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Windows\system32>cd C:\Program Files\salesforce.com\Apex Data Loader 22.0\bin

C:\Program Files\salesforce.com\Apex Data Loader 22.0\bin>process.bat "C:\Program Files\salesforce.com\Apex Data Loader 22.0\test\" csvLeadInsertProcess

Usage: java [-options] class [args...]         

                              (to execute a class) 

                     or  java [-options] -jar jarfile [args...]         

                              (to execute a jar file)
where options include:   

    -client       to select the "client" VM   

   -server       to select the "server" VM   

-hotspot      is a synonym for the "client" VM  [deprecated]                 

                     The default VM is client.
    -cp <class search path of directories and zip/jar files>   

   -classpath <class search path of directories and zip/jar files>                 

                           A ; separated list of directories, JAR archives,                 

                           and ZIP archives to search for class files. 

  -D<name>=<value>                  set a system property   

-verbose[:class|gc|jni]                  enable verbose output 

  -version      print product version and exit   

-version:<value>                  require the specified version to run   

-showversion  print product version and continue 

  -jre-restrict-search | -jre-no-restrict-search                  include/exclude user private JREs in the version search   

-? -help      print this help message   

-X            print help on non-standard options   


-enableassertions[:<packagename>...|:<classname>]                  enable assertions 


-disableassertions[:<packagename>...|:<classname>]                  disable assertions   

-esa | -enablesystemassertions                  enable system assertions   

-dsa | -disablesystemassertions                  disable system assertions   

-agentlib:<libname>[=<options>]                  load native agent library <libname>, e.g. -agentlib:hprof                    see also, -agentlib:jdwp=help and -agentlib:hprof=help    -agentpath:<pathname>[=<options>]                  load native agent library by full pathname    -javaagent:<jarpath>[=<options>]                  load Java programming language agent, see java.lang.instrument
C:\Program Files\salesforce.com\Apex Data Loader 22.0\bin>


I have no idea what it meant and all i know id that my process did not create the Leads from my csv file.

Any help is highly appreciated.






Can any one plz tell me the differences between DataLoader and Import wizard?