{"id":41638143,"url":"https://github.com/z-vig/classifyhyspecmoon","last_synced_at":"2026-01-24T15:02:52.267Z","repository":{"id":226636088,"uuid":"768820499","full_name":"z-vig/ClassifyHySpecMoon","owner":"z-vig","description":"Python Package for using neural networks to classify hyperspectral data on the moon","archived":false,"fork":false,"pushed_at":"2024-05-02T14:21:08.000Z","size":10572,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-02T17:56:42.016Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/z-vig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-07T19:49:10.000Z","updated_at":"2024-05-02T14:21:12.000Z","dependencies_parsed_at":"2024-03-28T15:48:10.320Z","dependency_job_id":"73cbf9b1-4a22-439b-8d82-6a05fdeea20b","html_url":"https://github.com/z-vig/ClassifyHySpecMoon","commit_stats":null,"previous_names":["z-vig/classifyhyspecmoon"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/z-vig/ClassifyHySpecMoon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z-vig%2FClassifyHySpecMoon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z-vig%2FClassifyHySpecMoon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z-vig%2FClassifyHySpecMoon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z-vig%2FClassifyHySpecMoon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/z-vig","download_url":"https://codeload.github.com/z-vig/ClassifyHySpecMoon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z-vig%2FClassifyHySpecMoon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-24T15:02:48.467Z","updated_at":"2026-01-24T15:02:52.246Z","avatar_url":"https://github.com/z-vig.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AOSC654 Term Project: ClassifyHySpecMoon\n\nWelcome to ClassifyHySpecMoon by z-vig!\n\n---\n### Introduction\n\n`ClassifyHySpecMoon` is a Python Package created for AOSC650 at the University of Maryland taught by Dr. Maria Molina. The goal of this package is to answer the following science question: \n\n\u003e **What unique lithologies exist at the Gruithuisen Domes region of the Moon that may be able to tell us about their formation mechanism?**\n\nTo answer this question, a 1D Convolution neural network is ultimately developed to classify hyperspectral data from the Moon Mineralogy Mapper (M^3^) with the following specifications:\n\n\u003e - One mosaicked Image of the Gruithuisen Gamma and Northwest Domes\n\u003e - 238,272 Pixels (Samples)\n\u003e - 239 Spectral Bands (Features)\n\n### Installation\nTo download the data, either download and mosaic the [images](https://pds.nasa.gov/ds-view/pds/viewDataset.jsp?dsid=CH1-ORB-L-M3-4-L2-REFLECTANCE-V1.0) yourself (see below for image information), or request access for the [google drive link](https://drive.google.com/file/d/1kM4KgaWzTF3_yZFpEO19Nir1lTrWcW1f/view?usp=drive_link) (zvig@umd.edu).\n\n\u003e M^3^ Images Used: M3T20090418T020644 and M3T2009418T020848\n\nTo initialize the package, use python 3.11, clone the github repo and create a virtual environment from the requirements.txt file by running the following in a clean directory in Windows Powershell (or the equivalent for other OS).\n\n`git clone https://github.com/z-vig/ClassifyHySpecMoon.git`\n\nThis clones the github repo to your current directory.\n\n`{PATH_TO}/python.exe -m venv .venv`\n\nThis creates a new directory called .venv iun your current directory where your virtual environemnt will live. To switch to this environment and install packages:\n\n`.venv/Scripts/Activate.ps1`\n\nAt this point, you may run into an error in which powershell will not allow you to run scripts on your machine. To remedy this, run an instance of powershell as administrator (right-click powershell \u0026rarr; run as administrator) and run:\n\n`Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine`\n\nTo learn more about execution policies and the potential dangers of setting your execution policy to unrestricted, [see here](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4).\n\n`{PATH_TO}/python.exe -m pip install -r requirements.txt`\n\nThis will finally install all the requirement python packages at their required versions for ClassifyHySpecMoon, given you are installing them with python 3.11. Now, all that is left to do is to perform a local import in the same github repo directory.\n\n```python\nimport classifyhyspecmoon\n```\n\n### Usage\n`ClassifyHySpecMoon` utilizes two main classes and one submodule to build a neural network using `keras_tuner` and `Scikit-Learn`.\n\n#### `NeuralNetData` Class\nThis class allows the easy input and preprocessing of data in an HDF5 format. To initialize an object, simply call\n\n```python\nfrom classifyhyspecmoon.neuralnetdata import NeuralNetData \nmyNNdata = NeuralNetData(path\\to\\data.hdf5)\n```\n\nFrom here, utilize the methods documented in the package docstrings to perform standard preprocessing steps defined in `scikit-learn` and `keras` using simply one-line coding steps. The use of this class allows for a clean and easy to follow user interface in the form of a jupyter notebook (see below).\n\n#### `MyHyperParameters` Class\nAlthough `keras` has a built-in class for handling hyperparameters, this class allows the user to modify which hyperparameters they want to focus on, which allows a simple interface with `keras_tuner`. Simply call the class and add hyperparameters as follows:\n\n```python\nfrom classifyhyspecmoon.buildNN import MyHyperParameters\nmyhp = MyHyperparameters(\n    nlyrs = float,\n    npl = list,\n    apl = list,\n    lrate = float,\n    batch_size = float,\n    nepochs = float\n)\n```\nThe documentation for the definition of these parameters are in the docstrings. These are currently the only hyperparameters available, but more may be added in the future.\n\n#### `run_mlp()` and `tune_model()` functions\nThese two functions are what actually allow the user to build a neural network using `keras`. `run_mlp()` allows the user to run a simple dense multilayer perceptron, whereas the `tune_model()` function can be input to a keras tuner object as follows:\n\n```python\ntuner = keras_tuner.RandomSearch(\n    hypermodel=tune_model,\n    objective='val_loss',\n    max_trials=5,\n    overwrite=True,\n    project_name='aosc_project'\n)\n```\n\n#### Jupyter Notebooks\nIncluding in the package are three jupyter notebooks showing the progression of building my neural network for the AOSC654 term project. The order in which they were developed is as follows:\n\n1. `regression_model.ipynb`\n2. `one_hot_model.ipynb`\n3. `tuned_CNN_model.ipynb`\n\nThese notebooks start with a basic regression-style multi-layer perceptron and progress by one-hot encoding and adding class weights to finally adding in 1D convolutional layers and model asessment capabilities. The first notebook may not currently run due to deprecated capabilities in `NeuralNetData`, but the final model in `tuned_CNN_model.ipynb` should be working just fine.\n\nThanks so much for trying out my work, and I hope you enjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz-vig%2Fclassifyhyspecmoon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fz-vig%2Fclassifyhyspecmoon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz-vig%2Fclassifyhyspecmoon/lists"}