Training of Barkhausen emission in nickel and iron