Investigation of the functional properties of MgxNi1−xFe2O4 ceramics