diff --git a/docs/source/For User/Contact us/Q&A.md b/docs/source/For User/Contact us/Q&A.md index 168c3409..118d3826 100644 --- a/docs/source/For User/Contact us/Q&A.md +++ b/docs/source/For User/Contact us/Q&A.md @@ -1,3 +1,4 @@ + # Frequently Asked Questions **For your reference, we have summarized some problems encountered and solved in the process of development and testing** @@ -33,6 +34,7 @@ The absolute path of any disk is fine, but the path cannot contain spaces, and i No, but the current process is a common data mining process, and we will write an abbreviated introduction afterwards. **Q6. I'm having trouble installing our software because the download speed for Ray/Fiona is too slow or failing. How should I resolve this issue?** + To resolve the issue of slow or failed downloads for Ray/Fiona during installation, you can use the pip command with the Tsinghua mirror source, which may improve download speeds. This applies to both Mac and Windows systems. Here's the command: ```bash @@ -52,4 +54,5 @@ Gitee Link: https://gitee.com/zju-earth-data/geochemistrypi This approach is also suitable for developers who want to test the latest updates. For more information, refer to the "Local Deployment" section under "For Developers" in the online documentation. + Reference video: [The Fastest Currently Feasible Installation Method in China—Installing from GitHub Using requirements.mp4](https://www.bilibili.com/video/BV1pM411V7iR/?spm_id_from=333.999.0.0&vd_source=350db2ec0e0c3ee7f424928a21e82674) +
diff --git a/docs/source/For User/Installation Manual.md b/docs/source/For User/Installation Manual.md index 52f7b3fd..6fa211bc 100644 --- a/docs/source/For User/Installation Manual.md +++ b/docs/source/For User/Installation Manual.md @@ -1,130 +1,331 @@

+ Installation Manual +

+ + #### Contents + + 1. [Preparation](#Preparation) + 2. [Download Geochemistry π](#Download-Geichemistry—π) + 3. [Solutions and Suggestions for Installation Failure](#Solutions) + + + ## 1. Preparation + + ### 1.1 Install Python Interpreter -A Python interpreter is a program that reads and executes Python code. When you write Python code in a text file with a `.py` extension, you can run that file using the Python interpreter. For example, use `python main.py` to executes the codes inside main.py file in command line or terminal. + + +A Python interpreter is a program that reads and executes Python code. When you write Python code in a text file with a `.py` extension, you can run that file using the Python interpreter. For example, use `python main.py` to executes the codes inside main.py file in command line or terminal. + + The normal ways to install Python interpreter: + + (1) If you are a Windows user, you can use Microsoft Store App to download directly by searching Python. + + (2) Refer to the download section in [Python official documentation](https://www.python.org). + + (3) If you are Chinese users, you can refer to this blog [Python Download - RUNOOB](https://www.runoob.com/python/python-install.html) to download too. -### 1.2 Install Conda -Conda allows you to easily install, update, and manage Python packages and dependencies. Usually, Conda is included the software Anaconda. Hence, by downloading Anaconda, you can install Conda too. + +### 1.2 Install Conda + + + +Conda allows you to easily install, update, and manage Python packages and dependencies. Usually, Conda is included the software Anaconda. Hence, by downloading Anaconda, you can install Conda too. + + The normal ways to install Anaconda: + + (1) Refer to the download section in [Anaconda website](https://www.anaconda.com). + + (2) If you are Chinese users, you can refer to [Anaconda Download - Zhihu](https://zhuanlan.zhihu.com/p/459601766) to download Anaconda using Tsinghua mirror source Anaconda. Also, if you are not familiar with Command Prompt (CMD) in Windows, you can reference to [Frequently Used Commands on Windows - Zhihu](https://zhuanlan.zhihu.com/p/67513308). + + + ## 2. Download Geochemistry π in Virtual Environment + + ### 2.1 Create A Virtual Environment + + Use Conda to manage virtual environments (recommended) : + + (1) Creates a virtual environment by installing the python interpreter, for example, to install a version 3.9 python interpreter, where `env_name` is the name of the created environment. To avoid version problems, it is better to use 3.9 version of python. + + On Mac Terminal: + + ``` + conda create -n vir_env_name python=3.9 + ``` + + On Windows Command Prompt: + + ``` + conda create -n vir_env_name python=3.9 + ``` +***\*Note:\**** + +1. In the command, 'vir_env_name' can be replaced by any name you want, like 'Geochemical_project'. Remember it's better not using Chinese characters. + +2. Please remember that our project are stable in 'python=3.9'. Other versions would make unkown mistakes. + +3. When meeting problems in the installation. Please check the python version first. + + + For the prompting information, input `y` to continue until the configuration is done. + + (2) Activate the created virtual environment. + + On Mac Terminal: + + ``` + conda activate vir_env_name + ``` + + On Windows Command Prompt: + + ``` + conda activate vir_env_name + ``` -For more useful Conda commands, please search online. + + +For more useful Conda commands, please search online. + + ### 2.2 Use pip to Download + + After the virtual environment is activated on your computer, you can follow the steps below to download our software: + + (1) Clear the cache packages: + + On Mac Terminal: + + ``` + pip cache purge + ``` + + On Windows Command Prompt: + + ``` + pip cache purge + ``` + + (2) Download our software: + + On Mac Terminal: + + ``` + pip install geochemistrypi + ``` + + On Windows Command Prompt: + + ``` + pip install geochemistrypi + ``` + + (3) Check the latest version of our software: + + On Mac Terminal: + + ``` + geochemistrypi --version + ``` + + On Windows Command Prompt: + + ``` + geochemistrypi --version + ``` -**Note**: Domestic direct installation may stop because of network speed problems in ray or Fiona package installation failure. You can reference the following video to resolve the problem. + + +***\*Note\****: Domestic direct installation may stop because of network speed problems in ray or Fiona package installation failure. You can reference the following video to resolve the problem. + + + [Possible Scenarios When Installing via pip Directly in China.mp4](https://www.bilibili.com/video/BV1Gs4y1d7Cm/?spm_id_from=333.999.0.0&vd_source=350db2ec0e0c3ee7f424928a21e82674) + + + ## 3. Solutions and Suggestions for Installation Failure -If you encounter errors while Installing the software, please refer to the **Q&A** section under **Contact Us** in the **FOR USER** of our online documentation. -If you are still unable to resolve the issue after consulting, you can visit the **Contact Us** section in our online documentation under **FOR USER**. There, you can report the error to our team. + +### 3.1 Use Tsinghua Mirror Source + + + +If you cannot download our software because Ray/Fiona downloads are too slow or just fail , you can use the pip with Tsinghua mirror source to re-download the package in terms of the specific error. + +``` + +pip install ray -i https://pypi.tuna.tsinghua.edu.cn/simple + +``` + ++ Reference video: [Solutions to Failures in Direct pip Installation in China.mp4](https://www.bilibili.com/video/BV1zg4y1j7bx/?spm_id_from=333.999.0.0&vd_source=350db2ec0e0c3ee7f424928a21e82674). + + + +### 3.2 Use 'pip install -r requirements/production.txt' + + + +Another way to download related dependecies is to clone the source code from GitHub or Gitee repository firstly: + + + +GitHub Link: https://github.com/ZJUEarthData/geochemistrypi + + + +Gitee Link: https://gitee.com/zju-earth-data/geochemistrypi + + + +After that, unpacking the source code file. Open Terminal on Mac or Command Promt on Window and navigate to the directory to the source code file, use the following command to download the dependency : + + + +``` + +pip install -r requirements/production.txt + +``` + + + +Or use the Tsinghua mirror source to download: + + + +``` + +pip install -r requirements/production.txt -i https://pypi.tuna.tsinghua.edu.cn/simple + +``` + + + ++ Reference video: [The Fastest Currently Feasible Installation Method in China—Installing from GitHub Using requirements.mp4](https://www.bilibili.com/video/BV1pM411V7iR/?spm_id_from=333.999.0.0&vd_source=350db2ec0e0c3ee7f424928a21e82674) + + + +***\*Note\****: Actually this method can be used for developers to test our latest updates. For more information, please refer to our online documentation in ***\*Local Deployment\**** under the section of ***\*FOR DEVELOPER\****. + + + +### 3.3 Report An Error to Our Team + + + +You can refer to our online documentation in ***\*Contact Us\**** under the section of ****FOR USER****. diff --git a/docs/source/For User/Model Example/Data_Preprocessing/Data Preprocessing.md b/docs/source/For User/Model Example/Data_Preprocessing/Data Preprocessing.md index 35cda903..f7fddc34 100644 --- a/docs/source/For User/Model Example/Data_Preprocessing/Data Preprocessing.md +++ b/docs/source/For User/Model Example/Data_Preprocessing/Data Preprocessing.md @@ -3,6 +3,30 @@ When we are working on data-mining or machine learning projects, the quality of your results highly depends on the quality of input data. As a result, data cleaning and preprocessing becomes an important step to make sure your input data is neat and balanced. Normally, data scientists will spend a large portion of their working time on data cleaning. However, Geochemistrypi can conduct this process automatically for you, and you just need to follow some simple steps. Firstly you need to start the geochemistrypi programm via command line instrucitons. Please refer to **Quick Installation** and **Example** to know how to start geochemistrypi. And now we use a classification data file as a sample. +#### Data Schema + +In order to utilize the functions provided by our software, your own data set should satisfy: + +- be with the suffix **.xlsx**, which is supported by Microsoft Excel. +- be comprise of location information **LATITUDE** and **LONGITUDE**, two columns respectively. + +If you want to run **classification** algorithm, only supporting binary classification currently, you data set should satisfy: + +- Tag column **LABEL** to differentiate the data. + +The following are four built-in data set in our software stored on Google Drive, have a look on them. For the algorithm you intend to run, you can refer to the data format of the corresponding dataset. + ++ [Data_Regression.xlsx (International - Google drive)](https://docs.google.com/spreadsheets/d/13MB4t_2PiZ90tTMJKw7HcBUi2sb3tXej/edit?usp=sharing&ouid=110717816678586054594&rtpof=true&sd=true) ++ [Data_Regression.xlsx (China - Tencent Docs)](https://docs.qq.com/document/DQ3VmdWZCTGV3bmpM?&u=6868f96d4a384b309036e04e637e367a) + ++ [Data_Classification.xlsx (International - Google drive)](https://docs.google.com/spreadsheets/d/1xFBCYVmtZfuEAbeBljUlzqBjxVuLAt8x/edit?usp=sharing&ouid=110717816678586054594&rtpof=true&sd=true) ++ [Data_Classification.xlsx (China - Tencent Docs)](https://docs.qq.com/document/DQ0JUaUFsZnRaZkNG?&u=6868f96d4a384b309036e04e637e367a) + ++ [Data_Clustering.xlsx (International - Google drive)](https://docs.google.com/spreadsheets/d/1sbuJdOzGNQ2Pk-bVURfPYg1rltyBbn5J/edit?usp=sharing&ouid=110717816678586054594&rtpof=true&sd=true) ++ [Data_Clustering.xlsx (China - Tencent Docs)](https://docs.qq.com/document/DQ3dKdGtlWkhZS2xR?&u=6868f96d4a384b309036e04e637e367a) + ++ [Data_Decomposition.xlsx (International - Google drive)](https://docs.google.com/spreadsheets/d/1kix82qj5--vhnm8-KhuUBH9dqYH6zcY8/edit?usp=sharing&ouid=110717816678586054594&rtpof=true&sd=true) ++ [Data_Decomposition.xlsx (China - Tencent Docs)](https://docs.qq.com/document/DQ29oZ0lhUGtZUmdN?&u=6868f96d4a384b309036e04e637e367a) #### Loading Data By running the start command, there will be a prompt if your dataset is successfully loaded: @@ -140,7 +164,28 @@ Geochemistrypi will generate null value report for the selected dataset: dtype: float64 Note: you don't need to deal with the missing values, we'll just pass this step! (Press Enter key to move forward.) -Note that if there is missing value in the dataset, you have to choose a strategy to deal with missing values. +At this point, you can choose whether to deal with the missing values. + +``` +-*-*- Missing Values Process -*-*- +Do you want to deal with the missing values? +1 - Yes +2 - No +(Data) ➜ @Number: +``` + +When you choose to deal with the missing values, Geochemistrypi will provide two methods for processing. + +``` +-*-*- Strategy for Missing Values -*-*- +1 - Drop Rows with Missing Values +2 - Impute Missing Values +Notice: Drop the rows with missing values may lead to a significant loss of data if too many features are chosen. +Which strategy do you want to apply? +(Data) ➜ @Number: +``` + +If you choose Impute Missing Values, you have to select a strategy to deal with the missing values. ``` @@ -155,7 +200,7 @@ Successfully fill the missing values with the mean value of each feature column (Press Enter key to move forward.) ``` -####Feature Engineering +#### Feature Engineering You can also genereate new features from the selected dataset. In order to do this, you should state the name of generated column. Here we name our new column "new feature", and then you have to identify some operations to generate the new feature. we simply use `b * c + d` (each column corresponds to an alphbetical letter for convinience) the output is as follows: