Today, in order to use wind turbines in controlling the frequency of a power network, droop and inertial control methods are used for variable speed wind turbine. Adjusting the gains on the droop and inertia control loops is very influential on the performance of wind turbines, but because of varying the wind speed and power system conditions, the adjustment of the control coefficients that produce the best response in all situations seems to be impossible. In this paper, a new method for adaptive adjusting of droop and inertia control loops gains in DFIG is presented. In order to eliminate the defects and problems of power system and wind turbine modeling, it is also proposed to use the data-driven method which only executes based on the input and output of the system. To control faster and in order to prevent the frequency drooping, applying the second derivative of the error is used to adaptive adjusting of droop and inertia control loop gains. In the proposed control method, using the K-Vector Nearest Neighborhood, the output of the next moment is estimated, and then, using the Hessian matrix, the coefficients of the frequency control loops are adjusted adaptively. Simulation results demonstrate the proper performance of a data-driven-based adaptive approach to increase the frequency nadir (FN) and to decrease the frequency variations of the power system in a steady state and transient state.