The paper presents an example of Instance-Based Learning using a supervised classification
method of predicting selected ductile cast iron castings defects. The test used the algorithm
of k-nearest neighbours, which was implemented in the authors’ computer application. To
ensure its proper work it is necessary to have historical data of casting parameter values
registered during casting processes in a foundry (mould sand, pouring process, chemical
composition) as well as the percentage share of defective castings (unrepairable casting defects).
The result of an algorithm is a report with five most possible scenarios in terms of
occurrence of a cast iron casting defects and their quantity and occurrence percentage in
the casts series. During the algorithm testing, weights were adjusted for independent variables
involved in the dependent variables learning process. The algorithms used to process
numerous data sets should be characterized by high efficiency, which should be a priority
when designing applications to be implemented in industry. As it turns out in the presented
mathematical instance-based learning, the best quality of fit occurs for specific values of
accepted weights (set #5) for number k = 5 nearest neighbours and taking into account the
search criterion according to “product index”.