/// <summary> /// Override training Examples to only check for the single training examples type /// </summary> /// <param name="from"></param> /// <param name="to"></param> /// <param name="portName"></param> protected override void CheckTrainingExamplesConnections(NodePort from, NodePort to, string portName) { // Evaluate the nodeport for training examples if (to.fieldName == portName) { // Check if the node connected was a training examples node bool isNotTrainingExamplesNode = this.DisconnectIfNotType <RIMLConfiguration, SingleTrainingExamplesNode>(from, to); // If we broke the connection... if (isNotTrainingExamplesNode) { // Prepare flag to show error regarding training examples m_ErrorWrongInputTrainingExamplesPort = true; } // If we accept the connection... else { SingleTrainingExamplesNode examplesNode = from.node as SingleTrainingExamplesNode; // We check that the connection is from a training examples node if (examplesNode != null) { // Update dynamic ports for output AddDynamicOutputPorts(examplesNode, ref m_DynamicOutputPorts); } } } }
public override void OnHeaderGUI() { // Get reference to the current node m_SingleTrainingExamplesNode = (target as SingleTrainingExamplesNode); nodeSpace = 360 + (m_ConnectedInputs + m_ConnectedTargets) * 60; NodeName = "TEACH THE MACHINE"; NodeSubtitle = "Classification & Regression Training Examples"; base.OnHeaderGUI(); }