Ejemplo n.º 1
0
        public ModelTraining()
        {
            InitializeComponent();
            Directory.SetCurrentDirectory(DataModeling.workDir);

            app = DataModeling.App.ScriptApp;
            ff  = new FeedforwardNetwork {
                LogLevel = 0, RefreshFreq = 50, Link = new DataLink()
            };

            propMan    = new VisuMap.Lib.PropertyManager(this, "Settings", "DataModeling");
            pluginRoot = DataModeling.App.GetPluginDataNode(0, "DataModeling", propMan.NameSpace, true);
            propMan.LoadProperties(pluginRoot);

            histograms[0] = new Histogram("Cost History", null);
            DataModeling.cmdServer.AddListener(CmdModelTraining);

            foreach (string name in DataModeling.modelManager.GetAllModelNames(app.Dataset))
            {
                cboxModelName.Items.Add(name);
            }
            cboxModelName.Items.Add(noneModelName);
            if (string.IsNullOrEmpty(ModelName))
            {
                cboxModelName.Text = "ModelA";
            }

            UpdateModelList();
            cboxModelScript.SelectedIndex = cboxModelScript.FindString(ModelScript);

            DataModeling.mdScript.CurrentTrainer = this;
            RefreshSettings();
        }
Ejemplo n.º 2
0
 public ModelServer()
 {
     InitializeComponent();
     Directory.SetCurrentDirectory(DataModeling.workDir);
     RefreshList();
     propMan    = new VisuMap.Lib.PropertyManager(this, "Settings", "DataModeling");
     pluginRoot = DataModeling.App.GetPluginDataNode(0, "DataModeling", propMan.NameSpace, true);
     propMan.LoadProperties(pluginRoot);
     DataModeling.mdScript.CurrentServer = this;
 }
Ejemplo n.º 3
0
        IForm playTarget    = null; // Play to recordered clips into a different window instead of the main window.

        public RecorderForm(IApplication app)
        {
            InitializeComponent();
            RecorderForm.app   = app;
            progressBar        = new ProgressBar(this.progressPanel);
            frameList          = new List <FrameSpec>();
            app.BodyMoved     += new EventHandler <EventArgs>(app_BodyMoved);
            app.MapConfigured += new EventHandler <EventArgs>(app_BodyMoved);
            this.MouseWheel   += new MouseEventHandler(RecorderForm_MouseWheel);
            propMan            = new VisuMap.Lib.PropertyManager(this, "Settings", "ClipRecorderNs");
            propMan.LoadProperties(PluginRoot);
            SyncMode();
        }
Ejemplo n.º 4
0
        public virtual void Initialize(IApplication app)
        {
            App = app;

            if (app.ScriptApp.ApplicationBuild < 935)
            {
                MessageBox.Show("Data Modeling plugin requires VisuMap 5.0.935 or higher!",
                                "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            app.InstallPluginObject(mdScript = new ModelingScript());

            ToolStripMenuItem miPlugin = App.GetPluginMenu();
            var gm = app.ScriptApp.GuiManager;

            miPlugin.DropDownItems.Add("Model Training", null, (s, e) => gm.ShowForm(new ModelTraining(), true));
            miPlugin.DropDownItems.Add("Model Evaluation", null, (s, e) => gm.ShowForm(new ModelTest(), true));
            miPlugin.DropDownItems.Add("Model Server", null, (s, e) => gm.ShowForm(new ModelServer(), true));
            miPlugin.DropDownItems.Add("Model Manager", null, (s, e) => gm.ShowForm(new ModelManager2(), true));

            app.InstallScriptPlugin(new PythonEngine());
            //app.InstallScriptPlugin(new J8Engine());

            propMan    = new VisuMap.Lib.PropertyManager(this, "Settings", "DataModeling");
            pluginRoot = DataModeling.App.GetPluginDataNode(0, "DataModeling", propMan.NameSpace, true);
            propMan.LoadProperties(pluginRoot);
            homeDir = app.ScriptApp.GetProperty("DataModeling.HomeDir", "");
            workDir = app.ScriptApp.GetProperty("DataModeling.WorkDir", "");
            if (!homeDir.EndsWith("\\"))
            {
                homeDir += "\\";
            }
            if (!workDir.EndsWith("\\"))
            {
                workDir += "\\";
            }

            SetDefaultWorkDir();
            modelManager = new ModelManager();

            app.InstallFileImporter(new NumpyFileImport());

            cmdServer = new CmdServer();
            cmdServer.Start();
            app.ShuttingDown       += App_ShuttingDown;
            app.ApplicationStarted += App_ApplicationStarted;
        }
Ejemplo n.º 5
0
        public ModelTest()
        {
            InitializeComponent();
            Directory.SetCurrentDirectory(DataModeling.workDir);
            app     = DataModeling.App.ScriptApp;
            dataset = app.Dataset;
            ff      = new FeedforwardNetwork();

            propMan    = new VisuMap.Lib.PropertyManager(this, "Settings", "DataModeling");
            pluginRoot = DataModeling.App.GetPluginDataNode(0, "DataModeling", propMan.NameSpace, true);
            propMan.LoadProperties(pluginRoot);
            tboxArgs.Text = Argument;

            tboxArgs.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
            tboxArgs.AutoCompleteCustomSource = argHistory;
            tboxArgs.AutoCompleteSource       = AutoCompleteSource.CustomSource;

            UpdateModelList();
            UpdateEvalScriptList();
            DataModeling.cmdServer.AddListener(CmdModelTest);
            DataModeling.mdScript.CurrentTester = this;
        }