python for data science and machine learning bootcamp free coupon code code example
Example: Python For Data Science And Machine Learning Bootcamp
from sklearn.model_selection import train_test_split
from sklearn.neural_network import MLPRegressor
df=pd.read_csv('your_dataset')
X_train, X_test, y_train, y_test = train_test_split(feature,
target,
test_size=0.2,
random_state=4)
MLPRegressor.fit(X_trian,y_train)
y_predicted=MLPRegressor.predict(X_test)
# use r2 scores for regression or other measurements
r2_score(y_test,y_predicted)