In order to prevent long term complications of diabetes its early diagnosis is crucial. With Increasing advances in Artifical Intelligence (AI) and Machine Learning(ML) researchers are increasingly focusing on using them for early diagnosis of diseases.AI and ML has significant potential for early prediction of type 2 diabetes. In this article we have described a ML based framework for prediction of type 2 diabetes -Improved Ensemble Learning with Dimensionality Reduction Model (IELDR) and discussed its result. An IELDR algorithm is an Auto encoder-based feature extraction method with ensemble learning. The experiments were carried out using the LS_diabetes dataset. LS_diabetes dataset containing 374 records with 35 features related to lifestyle and stress. Accuracy, precision, specificity, sensitivity, f1 score, roc and Mathew correlation coefficient (MCC) were measured. After this results were tested and validated using Diabetes_2019 dataset and PIMA diabetes dataset. The IELDR model showed results in terms accuracy, precision, specificity, sensitivity, f1 score, roc and Mathew correlation coefficient (MCC) of 98.67%, 95.24%, 100%, 98.18%, 97.56%, 99.09% and 0.97 respectively. In comparison with PIMA diabetes dataset, LS_diabetes dataset showed an accuracy, precision, sensitivity, specificity, f1-score,roc and mcc value by 17.96%,13.15% 40.22%,5.59%,28.38%,22.09% and 0.4 respectively. The IELDR model achieved the best result on the LS_diabetes dataset showed an accuracy, sensitivity, roc and mcc value improved by 1.82%, 1.58%, 3.01%and 0.04 % compared to the Diabetes_2019 dataset .This proposed IELDR system predicts the risk of type 2 diabetes in a healthy person based on the person’s current lifestyle pattern. This system can be helpful for early prediction of type2 diabetes.