Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to do "train_test_split" for image data set used in pyrasterframes? #59

Closed
JenniferYingyiWu2020 opened this issue Feb 1, 2021 · 3 comments

Comments

@JenniferYingyiWu2020
Copy link

Hi,
I have got the code for "supervised machine learning" of pyrasterframes, and the link is "https://rasterframes.io/supervised-learning.html". I have seen the author used 12 ".tiff" to train the machine learning model, however the training set and testing set has not been split. Also, I used the code "x_training_data, x_test_data, y_training_data, y_test_data = train_test_split(x, y, test_size = 0.3)" and hoped to split the training set and testing, but I am not sure which one is "x" and "y". So, could you pls help to give me some suggestions on how to split the training set and testing set for the program on the the link "https://rasterframes.io/supervised-learning.html"? Thanks!
1
2
3
4

@JenniferYingyiWu2020
Copy link
Author

JenniferYingyiWu2020 commented Feb 1, 2021

Hi,
I have added the "unsupervised machine learning" and "supervised machine learning" under my github repository "https://github.com/JenniferYingyiWu2020/rasterframes-GeoTIFFs/tree/main/machine-learning". What I needed is to do "train_test_split" for the image data set of "unsupervised machine learning" and "supervised machine learning". So, could you pls give me some suggestions? Thanks!
6

@JenniferYingyiWu2020
Copy link
Author

Hi,
I have read your codes about "supervised machine learning" (https://rasterframes.io/supervised-learning.html), and found out that the multi-band image is "['B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B09', 'B11', 'B12']". Now, I need to split "model_input" as training_set and test_set, however the "model_input" is a DataFrame, also the "['B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B09', 'B11', 'B12']" is Tile Array. So, could you pls give me some suggestions on how to convert the "model_input" as a multi-matrix? If the "model_input" can be converted to a multi-matrix, then the function "train_test_split" can be used to split the multi-band image as a training set and a test set. Thanks!

@wildintellect
Copy link
Contributor

This project is not related to rasterframes.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants