I'm a beginner at Python and I'm doing epidemiological research using machine learning, but I don't know if it's the right way to proceed.Currently, I am having trouble adjusting hyperparameters.If you don't mind, please give me some advice and point it out.
import numpy as np
import pandas aspd
import matplotlib.pyplot asplt
import seaborn as sns
import csv
csvfile=open('BioAsseT practice data5.csv')
df = pd.read_csv("BioAsseT practice data5.csv")
X = df.external
y = df.total
X.shape, y.shape
((103,), (103,))
from sklearn.model_selection import train_test_split
X_train_val, X_test, y_train_val, y_test=train_test_split(X,y,test_size=0.2, random_state=1)
X_train, X_val, y_train, y_val, y_test=train_test_split(X_train_val, y_train_val, test_size=0.3, random_state=1)
ValueError Traceback (most recent call last)
<ipython-input-39-3f9989894ee6>in<module>
---->1 X_train, X_val, y_train, y_val, y_test=train_test_split(X_train_val, y_train_val, test_size=0.3, random_state=1)
ValueError: not enough values to unpack (expected 5, got 4)
X_train, X_val, y_train, y_val, y_test=train_test_split(X_train_val, y_train_val, test_size=0.3, random_state=1)
There is one extra variable on the left above.Let's make it four.
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
620 Uncaught (inpromise) Error on Electron: An object could not be cloned
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.