"BG 352 is the best rice breed to be cultivated right there\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\KAREESHAN\\anaconda3\\lib\\site-packages\\sklearn\\base.py:450: UserWarning: X does not have valid feature names, but RandomForestClassifier was fitted with feature names\n",
" warnings.warn(\n"
]
}
],
"source": [
"N = 21\n",
"P = 26\n",
"K = 27\n",
"tem = 27.003155\n",
"humidity = 47.675254\n",
"ph = 5.699587\n",
"\n",
"\n",
"pred = predict_crop(N, P, K, tem, humidity, ph )\n",
"\n",
"if pred == 1:\n",
" print(\"BG 250 is the best rice breed to be cultivated right there\")\n",
"elif pred == 2:\n",
" print(\"suwendal is the best rice breed to be cultivated right there\")\n",
"elif pred == 3:\n",
" print(\"BG 352 is the best rice breed to be cultivated right there\")\n",
"elif pred == 4:\n",
" print(\"Mottaikaruppan is the best rice breed to be cultivated right there\")\n",
"elif pred == 5:\n",
" print(\"AT 356 is the best rice breed to be cultivated right there\")\n",
"else:\n",
" print(\"Sorry, we could not determine the best crop to be cultivated with the provided data.\")"