I'm relatively new to using Mathematica, and I was able to create a Classifier from a training set of about 3,000 pairs of non-numerical text strings.

I have my test set of about 20,000 records in an excel file in Column A. I would like to apply the classifier to each row in Column A, and export an output with Column A (test data) and Column B (Classifier result).

Is this possible? If so, how do you suggest I proceed?

Please find the sample input, steps, and desired output below. Please note that the data is masked, so the example may seem silly.

  1. Created a training set of ~3,000 records from text data in the following format

    trainingset = {"Run on the treadmill three times a day" -> "Run, treadmill, 3", "Run on the track twice daily" -> "Run, track, 2", "Lift weights at the gym three times a day" -> "Lift, gym, 3" ... ... etc.};

  2. On the trainingset, apply classifier:

    exercise = Classify[trainingset]

  3. Verified that the classifier will work on at least one example that is not in the training set

    exercise["run at the gym 2 times a day"]

    Output = Run,Gym,2

  4. Goal(s): A) Apply classifier to large test set currently housed in MS Excel, B) Export result side-by-side to an Excel sheet for validation

Desired Output:

|Column A|_______________________|Column B|

|Test Set Input|__________________|Classifer Output|

"Run at the gym twice daily"_________"Run, Gym, 2"

"Lift on the treadmill 3 times a day"____"Lift, Treadmill, 3"

  • $\begingroup$ If you used the cloud API framework then you could call the classifier from within excel. Jon McCloone has a related example in a recent video on the Wolfram youtube channel $\endgroup$ – Mike Honeychurch Jan 2 '18 at 6:33
  • 1
    $\begingroup$ The short answer is "yes" but really there is not enough detail here. A smallish example of sample input and desired output would make this into a proper (by MSE standards) question. $\endgroup$ – Daniel Lichtblau Jan 2 '18 at 15:47
  • $\begingroup$ @DanielLichtblau Added sample information in main post; apologies and thank you for your attention! $\endgroup$ – M0RPH0RX Jan 3 '18 at 2:06