Using the Microsoft TLC Machine Learning Tool

Microsoft has a machine learning tool called TLC, which I think used to stand for The Learning Code, but now it’s just an acronym. TLC is essentially a very large library of machine learning code that can be called in several ways (on a command line, as an API in code, Python, and a couple of internal Microsoft tools).

I believe that TLC is the core code used by Microsoft’s Azure Machine Learning service, but I could be wrong.

The TLC ML library has been around for many years. I hadn’t worked with TLC for a long time so I thought I’d refresh my memory.

I decided to do a classification analysis on the classical 150-item Iris Data Set using TLC called on a command line. I downloaded the TLC tool and extracted it.

The first step was to create a 120-item training file and a 30-item test file. I did so using the default tab-delimited format. For example, the first part of the training file was:

# file: iris_train.txt
#Label  SepLen  SepWid  PetLen  PetWid
0	3.5	1.4	0.2	5.1
0	3.0	1.4	0.2	4.9
(etc.)

Next I created a configuration file that had all the instructions:

# file: iris_traintest.rps
# desc: TLC train-test on the Iris dataset
# call: > maml.exe @iris_traintest.rsp

TrainTest
data=iris_train.txt
test=iris_test.txt
loader=text{
  hasheader=-
  col=Label:Num:0
  col=Features:Num:1-*}
trainer=MultiClassNeuralNetwork{
  hidden=10
  iter=1000
  lr=0.001
  loss=crossentropy
  refresh=200
  momentum=0.0
  weightdecay=0.0
  initwts=0.1
  shuf=+}
seed=12

# end-file

This is really a minimal config file; I estimate TLC has probably well over 200 options. If you understand neural networks, most of the config file should make sense, but if you don’t know NNs, the config probably looks incomprehensible.

tlcdemo_part1


tlcdemo_part2

I ran the confile file, and after fixing a few errors, finally got some output.

Bottom line: The TLC tool is very complex and has a steep learning curve, but for someone who works with ML on a daily basis, learning TLC might be a good investment.

Advertisements
This entry was posted in Machine Learning. Bookmark the permalink.