Answers for "python for data science"

2

python for data science

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)
Posted by: Guest on September-01-2020
-1

python for data science

#!/usr/bin/python

print "Hello, Python!"
Posted by: Guest on November-30-2020

Code answers related to "python for data science"

Python Answers by Framework

Browse Popular Code Answers by Language