Open ycw315989786 opened 6 years ago
nExperiments = 20 nEstimators = 50
nStart = 2
nIterations = 100
quality_metrics = ['accuracy']
dtst = DatasetCheckerboard2x2()
dtst.setStartState(nStart)
alR = ActiveLearnerRandom(dtst, nEstimators, 'random') alU = ActiveLearnerUncertainty(dtst, nEstimators, 'uncertainty') alLALindepend = ActiveLearnerLAL(dtst, nEstimators, 'lal-rand', lalModel1) alLALiterative = ActiveLearnerLAL(dtst, nEstimators, 'lal-iter', lalModel2) als = [alR, alU, alLALindepend, alLALiterative]
exp = Experiment(nIterations, nEstimators, quality_metrics, dtst, als, 'here we can put a comment about the current experiments')
res = Results(exp, nExperiments)
for i in range(nExperiments): print('\n experiment #'+str(i+1))
performance = exp.run() res.addPerformance(performance) exp.reset()
print() res.saveResults('checkerboard2x2-exp')
Finally,NotFittedError: Estimator not fitted, call fit before exploiting the model. Why?can you give me some advises?
fit
Please give full error message. I am guessing you have not run the first three blocks of the jupyter notebook.
time
nExperiments = 20 nEstimators = 50
nStart = 2
nIterations = 100
quality_metrics = ['accuracy']
dtst = DatasetCheckerboard2x2()
dtst.setStartState(nStart)
alR = ActiveLearnerRandom(dtst, nEstimators, 'random') alU = ActiveLearnerUncertainty(dtst, nEstimators, 'uncertainty') alLALindepend = ActiveLearnerLAL(dtst, nEstimators, 'lal-rand', lalModel1) alLALiterative = ActiveLearnerLAL(dtst, nEstimators, 'lal-iter', lalModel2) als = [alR, alU, alLALindepend, alLALiterative]
exp = Experiment(nIterations, nEstimators, quality_metrics, dtst, als, 'here we can put a comment about the current experiments')
res = Results(exp, nExperiments)
for i in range(nExperiments): print('\n experiment #'+str(i+1))
print() res.saveResults('checkerboard2x2-exp')
Finally,NotFittedError: Estimator not fitted, call
fit
before exploiting the model. Why?can you give me some advises?