public long?GetRneuronIdFromInputs(RlmGetRneuronIdFromInputs data)
        {
            RlmNetworkWebAPI      network = LoadNetworkFromCache(data);
            RlmSessionCaseHistory hist    = network.SessionCaseHistory;

            return(hist.GetRneuronIdFromInputs(data.InputValuesPair));
        }
Ejemplo n.º 2
0
        private IEnumerable <RlmLearnedCase> GetCasesLearningEvents(IEnumerable <IRLVIOValues> inputValues, IEnumerable <IRLVIOValues> outputValues, double scale)
        {
            IEnumerable <RlmLearnedCase> retVal = null;

            var  inputValuesPair = TransformIOValues(inputValues);
            long?rneuronId       = rlmHistory.GetRneuronIdFromInputs(inputValuesPair);
            long?solutionId      = null;

            if (!rneuronId.HasValue)
            {
                DataNotAvailableEvent?.Invoke(new Exception("Input values did not find a matching rneuron"));
            }
            else
            {
                var outputValuesPair = TransformIOValues(outputValues);
                solutionId = rlmHistory.GetSolutionIdFromOutputs(outputValuesPair);

                if (!solutionId.HasValue)
                {
                    DataNotAvailableEvent?.Invoke(new Exception("Output values did not find a matching solution"));
                }
            }

            if (rneuronId.HasValue && solutionId.HasValue)
            {
                currentRneuronId  = rneuronId.Value;
                currentSolutionId = solutionId.Value;
                retVal            = GetCasesLearningEvents(rneuronId.Value, solutionId.Value, scale);
                if (retVal.Count() == 0)
                {
                    DataNotAvailableEvent?.Invoke(new Exception("Cases not yet available for this rneuron and solution combination."));
                }
            }

            return(retVal);
        }
Ejemplo n.º 3
0
        public long?GetRneuronIdFromInputs(RlmGetRneuronIdFromInputs data)
        {
            RlmSessionCaseHistory hist = new RlmSessionCaseHistory(data.RlmName);

            return(hist.GetRneuronIdFromInputs(data.InputValuesPair));
        }