Пример #1
0
outDims = range(1,2)

for (inDimension,outDimension) in zip(inDims,outDims): 
    name ='MIMO ' + str(inDimension) + 'x' + str(outDimension)
    path = valPath + name + '/Checkpoints/'
    
    start_time = time.time()
    numTrials=int(NUMTRIALS/(inDimension*outDimension))
    sig = Signal(inDimension,outDimension,numTrials,numPlots=plots)

    # In this case, since we are only loading the model, not trying to train it,
    # we can use function simulate and preprocess 
    xData,yData = sig.system_validation_multi(disturbance=False,a_possible_values=[0.01,0.99],b_possible_values=[0.01,0.99],k_possible_values=[0,1],not_prbs=False)
    print("--- %s seconds ---" % (time.time() - start_time))
    
    xData=sig.PRBS()
    xData = sig.random_process()
    # Initialize the models that are saved using the parameters declared above
    predictor = Model()
    predictor.load_model(sig,path)
    
    #xData=np.sin(np.linspace(0,300))
    x=(xData) + 1
    huh = (scipy.stats.entropy(x))
    
    
    # Function to make predictions based off the simulation 
    kp_yhat = predictor.predict_multinomial(sig,stepResponse=False)
    #tau_yhat = self.modelDict['tau'](sig.xData['tau'])
    #theta_yhat = self.modelDict['theta'](sig.xData['theta'])