A system and method for calibrating a sensor. The method may include,
without limitation, compiling an array of data relating to the sensor;
adjusting a sensor parameter a first time based on data in the array;
adjusting a curve representing the sensor output based on data in the
array; and adjusting the sensor parameter a second time based on data in
the array. The sensor may be an in vivo glucose sensor and the sensor
parameter adjusted may be a current. The array may include historical as
well as recent data, such as, for example, blood glucose readings and
sensor electrode readings.