SenteraLLC / geoml

API to retrieve training data, create X matrix, and perform feature selection, hyperparameter tuning, training, and model testing.
MIT License
1 stars 0 forks source link

Add function to `feature_data` to get or set the random seed #12

Closed tnigon closed 4 years ago

tnigon commented 4 years ago

If a random_seed was passed, save it to object. Otherwise, get a random number then save to object.

Also provide flexibility to write the random seed to a README file - this feature does not exist yet, but will at some point.

tnigon commented 4 years ago

Use case:

from research_tools import feature_data

base_dir_data = 'I:/Shared drives/NSF STTR Phase I – Potato Remote Sensing/Historical Data/Rosen Lab/Small Plot Data/Data'
feat_data_cs = feature_data(base_dir_data)

If feat_data_cs.dir_results was not set, returns:

must be set to create README file.

Otherwise:

dir_results = r'C:\Users\nigo0024\Downloads\this\new\dir'
feat_data_cs = feature_data(base_dir_data, dir_results=dir_results)

Will return nothing, but create a new directory (if it doesn't exist), and write the README file to the dir_results directory.