The Modern agriculture industry is datacentred, precise and smarter than ever. Advanced development of Internet-of-Things (IoT) based systems redesigned "smart agriculture". This emergence in innovative farming systems is gradually enhancing the crop yield, reduces irrigation wastages and making it more profitable. Machine learning (ML) methods achieve the requirement of scaling the learning performance of the model. This paper introduces a hybrid ML model with IoT for yield prediction. This work involves three phases : preprocessing, feature selection(FS) and classification. Initially, the dataset is preprocessed and FS is done on the basis of Correlation based FS (CBFS) and the Variance Inflation Factor algorithm (VIF). Finally, a two-tier ML model is proposed for IoT based smart agriculture system. In the first tier, the Adaptive k-Nearest Centroid Neighbour Classifier (aKNCN) model is proposed to estimate the soil quality and classify the soil samples into different classes based on the input soil properties. In the second tier, the crop yield is predicted using the Extreme Learning Machine algorithm (ELM). In the optimized strategy, the weights are updated using modified Butterfly Optimization algorithm (mBOA) to improve the performance accuracy of ELM with minimum error values. PYTHON is the implementation tool for evaluating the proposed system. Soil dataset is utilized for performance evaluation of the proposed prediction model. Various metrics are considered for the performance evaluation such as accuracy, RMSE, R2, MSE, MedAE, MAE, MSLE, MAPE and Explained Variance Score (EVS).