I assume the fan is meant to cool.
PID myPID(&Input, &Output, &Setpoint,Kp,Ki,Kd, DIRECT);
If Setpoint is 15 and Input is 17 then the error is Setpoint - Input = -2. In this situation, the fan should be on to bring the Input down to 15.
This is from the header file...
DIRECT means the output will increase when error is positive. REVERSE means the opposite.
The error is negative and you specified DIRECT. The PID algorithm will try to drive the output more negative. The opposite of what you want.