Cody

# Problem 44655. Computational power of Cody servers

Solution 1687404

Submitted on 6 Dec 2018
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
assessFunctionPresence({'fminsearch', 'optimset'}, 'FileName','predictor.m', 'Feedback','You must use the specified methodology')

The submission must contain the following functions or keywords: fminsearch, optimset You must use the specified methodology

2   Pass

3   Pass
futureDate = '22-Jan-2019'; predictedRuntime_correct = round(0.935043294718475, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct)) futureDate = '23-Jan-2019'; predictedRuntime_correct = round(0.934448955935569, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct)) futureDate = '24-Jan-2019'; predictedRuntime_correct = round(0.933855075296061, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint3 (line 3) In solutionTest (line 9)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint3 (line 7) In solutionTest (line 9)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint3 (line 11) In solutionTest (line 9)]

4   Pass
futureDate = '09-Jan-2020'; predictedRuntime_correct = round(0.751755426901932, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct)) futureDate = '13-Jan-2020'; predictedRuntime_correct = round(0.749945312632780, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint4 (line 3) In solutionTest (line 11)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint4 (line 7) In solutionTest (line 11)]

5   Pass
futureDate = '06-Jan-2021'; predictedRuntime_correct = round(0.608254613313523, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct)) futureDate = '11-Jan-2021'; predictedRuntime_correct = round(0.606545074994730, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint5 (line 3) In solutionTest (line 13)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint5 (line 7) In solutionTest (line 13)]

6   Pass
futureDate = '06-Feb-2022'; predictedRuntime_correct = round(0.491354117473879, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct)) futureDate = '10-Feb-2022'; predictedRuntime_correct = round(0.490345992043568, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint6 (line 3) In solutionTest (line 15)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint6 (line 7) In solutionTest (line 15)]

7   Pass
futureDate = '06-Nov-2023'; predictedRuntime_correct = round(0.364155581026111, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct)) futureDate = '21-Nov-2023'; predictedRuntime_correct = round(0.361853937995679, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct)) futureDate = '25-Nov-2023'; predictedRuntime_correct = round(0.361244649648014, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct)) futureDate = '27-Nov-2023'; predictedRuntime_correct = round(0.360940709522436, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint7 (line 3) In solutionTest (line 17)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint7 (line 7) In solutionTest (line 17)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint7 (line 11) In solutionTest (line 17)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint7 (line 15) In solutionTest (line 17)]

8   Pass
futureDate = '01-Jan-3000'; predictedRuntime_correct = round(0.164021404839, 4); assert(isequal(predictor(futureDate, data), predictedRuntime_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint8 (line 3) In solutionTest (line 19)]

9   Pass
% Assure no 'workarounds' that avoid appropriate use of optimset. % (Added 29 May 2018.) futureDate = {'19-Dec-2019'; '04-Oct-2020'; '06-Nov-2020'; '20-Nov-2020'; '07-Dec-2020'; '09-Dec-2020'; '11-Dec-2020'; '25-Feb-2021'; '04-Mar-2021'; '18-Apr-2021'; '19-May-2021'; '23-Jul-2021'}; pRuntime_c_unrounded = {0.761350673860113 0.641651747331991 0.629650497697623 0.624650604424140 0.618651428148657 0.617950799242008 0.617251250072375 0.591452258418511 0.589151203003048 0.574651625923890 0.564951737257372 0.545350739105932}; for j = 1 : length(futureDate) assert(isequal(predictor(futureDate{j}, data), round(pRuntime_c_unrounded{j}, 4))) end;

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In predictor (line 2) In ScoringEngineTestPoint9 (line 6) In solutionTest (line 21)]