diff --git a/help/rapid.regression.maxhelp b/help/rapid.regression.maxhelp new file mode 100644 index 0000000..738f224 --- /dev/null +++ b/help/rapid.regression.maxhelp @@ -0,0 +1,545 @@ +{ + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 8, + "minor" : 2, + "revision" : 1, + "architecture" : "x64", + "modernui" : 1 + } +, + "classnamespace" : "box", + "rect" : [ 251.0, 96.0, 726.0, 534.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 2, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "mzed_default", + "assistshowspatchername" : 0, + "boxes" : [ { + "box" : { + "format" : 6, + "id" : "obj-31", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 578.0, 450.0, 102.0, 22.0 ] + } + + } +, { + "box" : { + "id" : "obj-29", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "float", "" ], + "patching_rect" : [ 578.0, 418.0, 35.0, 22.0 ], + "text" : "timer" + } + + } +, { + "box" : { + "id" : "obj-28", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 101.0, 162.0, 150.0, 20.0 ], + "text" : "Bad data for testing:" + } + + } +, { + "box" : { + "id" : "obj-27", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 29.0, 42.0, 150.0, 20.0 ], + "text" : "These two are good data:" + } + + } +, { + "box" : { + "id" : "obj-23", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 583.0, 228.0, 75.0, 20.0 ], + "text" : "doesn't work" + } + + } +, { + "box" : { + "id" : "obj-25", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 33.0, 207.0, 247.0, 22.0 ], + "text" : "setparse ex3 input: 4. 4. output: 1600 16. 16." + } + + } +, { + "box" : { + "id" : "obj-24", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 332.0, 268.0, 35.0, 22.0 ], + "text" : "clear" + } + + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 173.0, 403.0, 34.0, 22.0 ], + "text" : "write" + } + + } +, { + "box" : { + "id" : "obj-20", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 120.0, 402.0, 32.0, 22.0 ], + "text" : "train" + } + + } +, { + "box" : { + "id" : "obj-2", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "patching_rect" : [ 140.0, 457.0, 128.0, 22.0 ], + "text" : "rapid.regression tester" + } + + } +, { + "box" : { + "id" : "obj-16", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 505.0, 207.0, 32.0, 22.0 ], + "text" : "train" + } + + } +, { + "box" : { + "id" : "obj-15", + "maxclass" : "button", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 608.5, 313.0, 24.0, 24.0 ] + } + + } +, { + "box" : { + "id" : "obj-19", + "maxclass" : "newobj", + "numinlets" : 6, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 497.0, 66.0, 107.0, 22.0 ], + "text" : "scale 0 127 -1. 10." + } + + } +, { + "box" : { + "id" : "obj-18", + "maxclass" : "slider", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "parameter_enable" : 0, + "patching_rect" : [ 517.0, 19.0, 140.0, 34.0 ] + } + + } +, { + "box" : { + "id" : "obj-17", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 493.0, 95.0, 39.0, 22.0 ], + "text" : "$1 $1" + } + + } +, { + "box" : { + "id" : "obj-13", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 544.0, 95.0, 32.0, 22.0 ], + "text" : "3. 3." + } + + } +, { + "box" : { + "id" : "obj-7", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 120.0, 95.0, 282.0, 22.0 ], + "text" : "replace ex2::input 3. 3., replace ex2::output 900 9.9" + } + + } +, { + "box" : { + "id" : "obj-14", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 395.0, 336.0, 125.0, 22.0 ], + "text" : "300. 3.3" + } + + } +, { + "box" : { + "id" : "obj-10", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 589.0, 116.0, 32.0, 22.0 ], + "text" : "1. 1." + } + + } +, { + "box" : { + "id" : "obj-11", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 571.0, 204.0, 93.0, 22.0 ], + "text" : "dictionary tester" + } + + } +, { + "box" : { + "id" : "obj-12", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 93.0, 66.0, 282.0, 22.0 ], + "text" : "replace ex1::input 1. 1., replace ex1::output 300 3.3" + } + + } +, { + "box" : { + "id" : "obj-9", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 312.0, 186.0, 62.0, 22.0 ], + "text" : "set gar 22" + } + + } +, { + "box" : { + "id" : "obj-5", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 401.0, 207.0, 65.0, 22.0 ], + "text" : "train tester" + } + + } +, { + "box" : { + "id" : "obj-8", + "maxclass" : "button", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 192.0, 284.0, 24.0, 24.0 ] + } + + } +, { + "box" : { + "id" : "obj-4", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "patching_rect" : [ 417.0, 268.0, 203.0, 22.0 ], + "text" : "rapid.regression @trainingDict tester" + } + + } +, { + "box" : { + "id" : "obj-3", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 317.5, 217.0, 64.0, 22.0 ], + "text" : "set test 33" + } + + } +, { + "box" : { + "id" : "obj-1", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 4, + "outlettype" : [ "dictionary", "", "", "" ], + "patching_rect" : [ 257.0, 297.0, 61.0, 22.0 ], + "saved_object_attributes" : { + "embed" : 0, + "parameter_enable" : 0, + "parameter_mappable" : 0 + } +, + "text" : "dict tester" + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-4", 0 ], + "source" : [ "obj-10", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-4", 0 ], + "source" : [ "obj-11", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-12", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-4", 0 ], + "source" : [ "obj-13", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-29", 1 ], + "order" : 0, + "source" : [ "obj-15", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-29", 0 ], + "order" : 1, + "source" : [ "obj-15", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-15", 0 ], + "order" : 0, + "source" : [ "obj-16", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-4", 0 ], + "order" : 1, + "source" : [ "obj-16", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-4", 0 ], + "source" : [ "obj-17", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-19", 0 ], + "source" : [ "obj-18", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-17", 0 ], + "source" : [ "obj-19", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-2", 0 ], + "source" : [ "obj-20", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-2", 0 ], + "source" : [ "obj-22", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-24", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-25", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-31", 0 ], + "source" : [ "obj-29", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-3", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-14", 1 ], + "source" : [ "obj-4", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-15", 0 ], + "source" : [ "obj-4", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-4", 0 ], + "source" : [ "obj-5", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-7", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-8", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-9", 0 ] + } + + } + ], + "dependency_cache" : [ { + "name" : "rapid.regression.mxe64", + "type" : "mx64" + } + ], + "autosave" : 0, + "editing_bgcolor" : [ 0.886274509803922, 0.996078431372549, 0.850980392156863, 1.0 ] + } + +} diff --git a/source/projects/rapid.regression/rapid.regression.cpp b/source/projects/rapid.regression/rapid.regression.cpp index a81b490..ddf4b2f 100644 --- a/source/projects/rapid.regression/rapid.regression.cpp +++ b/source/projects/rapid.regression/rapid.regression.cpp @@ -283,7 +283,7 @@ class rapid_regression : public object message<> train_msg { this, "train", "Use a dictionary of examples to train a regression model.", train }; message<> write_msg { this, "write", "Write a trained model as a json file.", write }; - message<> init_msg{ this, "init", "Reset model to untrained state", initialize }; + message<> init_msg { this, "init", "Reset model to untrained state", initialize }; //FIXME: This isn't finding a Max dictionary. //message<> dictionary{ this, "dictionary", "Use a dictionary of examples to train a regression model.", train };