Skip to main content
ConductScienceScienceDex
zenodoopen

1200 pixels spectral datasets

<p>In the Zip, spectral. npy was the average spectral data of red ginseng, mycotoxins and interference impurities, and label. npy was the corresponding label. &nbsp;Spectral data format was [1200,510] and label data format was [1200,1]. &nbsp;The example of data usage (sklearn in Python database was used to establish the classification model) was as follows:</p> <p>import numpy as np<br>from sklearn. model_selection import train_test_split<br>from sklearn. preprocessing import StandardScaler<br>from sklearn. neighbors import KNeighborsClassifier<br>from sklearn. metrics import classification_report, accuracy_score</p> <p># Load spectral data and labels<br>x = np.load('.../spectral.npy')[:,1:-1]<br>y = np.load('.../label.npy')</p> <p>x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2, random_state=42)</p> <p># Data standardization<br>scaler = StandardScaler()<br>x_train = scaler.fit_transform(x_train)<br>x_test = scaler.transform(x_test)</p> <p># Train the KNN model<br>knn_model = KNeighborsClassifier(n_neighbors=5)&nbsp;<br>knn_model. fit(x_train, y_train)</p> <p># Predict<br>y_pred = knn_model.predict(x_test)</p> <p># Print classification reports and accuracy rates<br>print("Classification Report:")<br>print(classification_report(y_test, y_pred))<br>print("Accuracy Score:")<br>print(accuracy_score(y_test, y_pred))</p>

ShareScore

32/100

Overall dataset sharing score

Score breakdown

These five areas show where the dataset supports — or may limit — practical reuse.

Stewardship
4
Harmonization
4
Access
16
Reuse readiness
8
Engagement
0

Dataset details

Repository
zenodo
Published
April 28, 2024
License
cc-by-4.0
DOI
10.5281/zenodo.11082599

Scored with release 0.9.0

ScienceDex for faculty

Your academic CV and NIH biosketch

Make your CV in your school's format and your NIH biosketch from it, then download both as Word files.