Exemple #1
0
        public RlmStats GetStatistics()
        {
            RlmStats retVal = null;

            using (RlmDbEntities db = new RlmDbEntities(DatabaseName))
            {
                retVal = RlmUtils.GetRNetworkStatistics(db, CurrentNetworkID);
            }

            return(retVal);
        }
Exemple #2
0
        public int GetTotalSimulationInSeconds()
        {
            int retVal = 0;

            using (RlmDbEntities db = new RlmDbEntities(DatabaseName))
            {
                retVal = RlmUtils.GetTotalSimulationInSeconds(db, CurrentNetworkID);
            }

            return(retVal);
        }
Exemple #3
0
        public IEnumerable <Case> GetCases(long sessionId, int?skip = null, int?take = null)
        {
            IEnumerable <Case> retVal = null;

            using (RlmDbEntities db = new RlmDbEntities(DatabaseName))
            {
                retVal = RlmUtils.GetCases(db, sessionId, skip, take);
            }

            return(retVal);
        }
Exemple #4
0
        public IEnumerable <RlmSessionSummary> GetSessionSummary(int groupBy, bool descending = false)
        {
            IEnumerable <RlmSessionSummary> retVal = null;

            using (RlmDbEntities db = new RlmDbEntities(DatabaseName))
            {
                retVal = RlmUtils.GetSessionSummary(db, CurrentNetworkID, groupBy, descending);
            }

            return(retVal);
        }
Exemple #5
0
        public IEnumerable <Session> GetSessions(int?skip = null, int?take = null, bool descending = false)
        {
            IEnumerable <Session> retVal = null;

            using (RlmDbEntities db = new RlmDbEntities(DatabaseName))
            {
                retVal = RlmUtils.GetSessions(db, CurrentNetworkID, skip, take, descending);
            }

            return(retVal);
        }
Exemple #6
0
        public double GetVariance(int top)
        {
            double retVal = 0D;

            if (SessionCount > 0)
            {
                using (RlmDbEntities db = new RlmDbEntities(DatabaseName))
                {
                    RlmUtils.GetVariance(db, CurrentNetworkID, top);
                }
            }

            return(retVal);
        }
        public void ResetNetwork()
        {
            if (CurrentNetworkID < 0)
            {
                throw new Exception("Cannot reset a non existing network. You must create or load a network first.");
            }

            using (RlmDbEntities db = new RlmDbEntities(DatabaseName))
            {
                RlmUtils.ResetTrainingData(db, CurrentNetworkID);
            }

            // recreates network from scratch
            // TODO don't know if we need this later on when resetting the network. Just creating new one since we are dropping entire DB
            //NewNetwork(CurrentNetworkName, Inputs.ToList(), Outputs.ToList());
        }