{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyNmHgoV+wimoDpo9xMpFxxn"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":4,"metadata":{"id":"BKOKO-XTh5pQ","executionInfo":{"status":"ok","timestamp":1710613913382,"user_tz":-420,"elapsed":312,"user":{"displayName":"Nhật Quang Đoàn","userId":"10175964550021301622"}}},"outputs":[],"source":["import numpy as np\n","from sklearn import datasets\n","\n","from sklearn.ensemble import RandomForestRegressor\n","from sklearn.model_selection import train_test_split\n","from sklearn.feature_selection import RFECV\n","import matplotlib.pyplot as plt\n","X,y = datasets.load_iris(return_X_y=True)"]},{"cell_type":"code","source":["X_train, X_test, y_train, y_test = train_test_split( X, y, test_size=0.33, random_state=42)\n","rf = RandomForestRegressor(random_state=0)\n","\n","rf.fit(X_train,y_train)\n"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":74},"id":"rznJTheliIWz","executionInfo":{"status":"ok","timestamp":1710613937025,"user_tz":-420,"elapsed":767,"user":{"displayName":"Nhật Quang Đoàn","userId":"10175964550021301622"}},"outputId":"0ac70b72-7115-4a8d-820c-5e9d680a75d4"},"execution_count":6,"outputs":[{"output_type":"execute_result","data":{"text/plain":["RandomForestRegressor(random_state=0)"],"text/html":["
RandomForestRegressor(random_state=0)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
RandomForestRegressor(random_state=0)