遇见数据集

<b>Toward Implicit Gaze-Based Map Interaction: Predicting Selection Intentions from Eye Movements</b>

收藏
NIAID Data Ecosystem2026-05-10 收录
官方服务:

资源简介:

README for Code and Data of the Research Paper Title: Toward Implicit Gaze-Based Map Interaction: Predicting Selection Intentions from Eye Movements 1. Requirements- python=3.9.18- scipy=1.11.4- tqdm=4.66.5- numpy=1.26.3- pandas=2.1.4- matplotlib=3.7.2- scikit-learn=1.4.2- lightgbm=4.3.0- imbalanced-learn=0.11.0- xgboost=1.7.3- shap=0.42.12. Folder StructureThe folder named “GazeUserProfiling” contains the following subdirectories: · code: Contains code of preprocessing and classification for the GazeIntentionPredicting.· data: Includes the raw data for computing eye movement features: gaze data, fixation data, saccade data, the map distinction coordination required for computing the GazeDistance feature and fixationfrequency.csv, which is used in computing saccade encoding.· result: We provide several feature computation and intention prediction results, organized into three folders: cross_dataset, which contains the cross-dataset prediction results; Feature, which includes the K-fold and LOGO cross-validation results as well as the computed features metrics; FeatureClassify, which contains the classified features in the mouse interaction mode. In addition, The folder also includes, for reference, the features selected in the gaze mode under the 1000-window/1000-step setting with 1Win-In-Adv prediction in the K-fold cross-validation, called selected_features.txt.· readme.pdf: This README file.· GazeIntentionPredicting.yml: The required dependencies for setting up the Python coding environment.3. Running InstructionsStep 1: Compute the eye movement features which are used in classification. Run TimeWindowQuantify.py to output the raw data with timestamps. The input data is ‘data/ fixation.csv’. Then run Window_Feature.py, which uses the function FeatureComputing(fixationfile, saccadefile, fixgazefile, window, step, round) from FeatureComputing.py to generate the feature set. The FeatureComputing() function calls functions within GazeFeatureCalculate.py to compute various eye-movement features and integrate them. Step 2: Preprocessing. Run the script ‘ClassifierCompare.py’, to determine the best classifier in Section 2.5. Run the script ‘FeatureSelectionCurve.py’ to select the number of features to extract in Section 2.4. Both scripts need to use the eye movement features runed in Step1 as input. Step 3: Classification. Run the script ‘GazeSelectionPredicting_Window.py’ to conduct the K-fold cross-validation in Section 2.6 (1). Run the script ‘MixPredicting.py’ to conduct the cross-dataset in Section 2.6 (2). Run the script ‘GazeSelectionPredicting_Window_LOPO.py’ to conduct the LOGO cross-validation in Section 2.6 (3). Run the script ‘GazeSelectPredicting_Window_Selection.py’ to perform classification including the selection points and get the result in Section 3.1, Table 4. Run the script ‘FeatureClassifyPrediction.py’ to perform classification for different types of eye movement features and get the result in Section 3.3, Figure 9. 4. code1. TimeWindowQuantify.pyDetermine the timestamp corresponding to each fixation, mode is the interactive mode, gaze or mouse. · Function: TimeWindowQuantify(mode)· Output: Fixation file with timestamps, used as input for Window_Feature()2. Window_Feature.pyCompute the eye movement feature file for a given time window combination, the function internally calls FeatureComputing(). · Function: WindowFeature(window, step, timefile, mode).· Input: window is the size of time window; step is the length of the time window step; timefile is the output of TimeWindowQuantify(mode); mode is the interactive mode.· Output: Windowfile: Eye movement feature file for the input time window combination, which can be saved freely.3. FeatureComputing.pyCompute all eye movement features and consolidate them into a single .csv file. · Function: FeatureComputing(fixationfile, saccadefile, fixgazefile, window, step, round)· Input: fixationfile, saccadefile, fixgazefile is a fixation, saccade, gaze file with timestamps and corresponding indices, respectively; window is the size of time window; step is the length of the time window step; round is the num of advanced time. These inputs are already computed within WindowFeature(window, step, timefile, mode) and can be called directly, theoretically, no modification is needed.· Output: FeatureFileSet: the consolidated feature set.4. GazeFeatureCalculate.py· Function: FixationDensity(fixationfile); SaccadeFrequency(fixationfile, saccadefile, window, step, round); SaccadeFixationRate(fixationfile, saccadefile); ConvexHullArea(saccadefile); TotalScanpathLength(saccadefile); RawXYStd(fixationfile, fixgazefile); RawGazeStatistical(fixationfile, fixgazefile); GazeXYDelta(fixationfile, fixgazefile); SaccadeEncoding(saccadefile); SaccadeStatisticalFeature(saccadefile); FixationStatisticalFeature(fixationfile); GazeDistanceFeature(fixationfile).· Input: Same as the input for FeatureComputing.py.· Output: Each function returns its own feature file separately.5. ClassifierCompare.pySelect the optimal classifier. · Function: get_classifier(clf_name); ClassifierCompare(classifier, mode)· Input: clf_name, classifier: The corresponding classifier type; mode is the interactive mode· Output: The get_classifier(clf_name) function returns the corresponding classification algorithm. the results are output to a file in ClassifierCompare (classifier, mode), which does not return any value.6. FeatureSelectionCurve.pySelect the optimal number of feature selection. · Function: FeatureSelectionCurve(mode, num, n)· Input: mode is the interactive mode; num is the num of advanced window; n is the num of selected features.· Output: Output the result file containing the current number of extracted features n, the function does not return a value.7. custom_fit.pyConduct the grid search and simultaneously output the current progress of the grid search. The custom_fit() is called by the classification function. · Function: ParameterSearch (clf_name); custom_fit(model, grid, X_train, y_train, X_val, y_val, cv=5)· Input: clf_name is the corresponding classifier type and this is ‘LightGBM’; model is the classifier algorithm, grid is the parameter grid returned by ParameterSearch(clf_name), and X_train, y_train, X_val, y_val are the corresponding training and validation sets.· Output: the best params and score for the results of grid search.8. FeatureSelection_mRMR.pyConduct the feature selection using mRMR. This function is called by the classification function. · Function: FeatureSelection_mRMR(file, featurenum)· Input: file is the file of feature set; featurenum is the num of selected features.· Output: List of selected feature names.9. GazeSelectionPredicting_Window.pyPerforms K-Fold cross-validation (K=10). · Function: GazeSelectPredicting_Window(window, step, num, mode)· Input: window is the size of time window; step is the length of the time window step; num is the num of advanced window; mode is the interactive mode.· Outputs:o Classification performanceo SHAP value for negative classo SHAP value for positive classo SHAP value for baselineo AUC variableso Classifier probability estimateso The sample set used for the current classificationThis function does not return any values. 10. GazeSelectionPredicting_Window_Selection.pyPerforms K-Fold cross-validation (K=10) using the selection window as the positive class. · Function: GazeSelectPredicting_Window_Selection(window, step, num, mode)· Input: window is the size of time window; step is the length of the time window step; num is the num of advanced window; mode is the interactive mode.· Outputs:o Classification performance o SHAP value for negative class o SHAP value for positive class o SHAP value for baseline o AUC variables o Classifier probability estimates o The sample set used for the current classification This function does not return any values. 11. MixPredicting()Performs the cross-dataset classificatino. • Function: MixPredicting(trainmode, testmode).Input: trainmode is the mode used as training data; testmode is the mode used as testing data.· Outputs:o Classification performance o SHAP value for negative class o SHAP value for positive class o SHAP value for baseline o AUC variables o Classifier probability estimates o The sample set used for the current classification This function does not return any values. 12. GazeSelectionPredicting_Window_LOGO.pyPerforms LOGO cross-validation. · Function: GazeSelectPredicting_Window_LOGO(window, step, num, mode)· Input: window is the size of time window; step is the length of the time window step; num is the num of advanced window; mode is the interactive mode.· Outputs:o Classification performance o SHAP value for negative class o SHAP value for positive class o SHAP value for baseline o AUC variables o Classifier probability estimates o The sample set used for the current classification This function does not return any values. 13. FeatureClassifyPrediction.pyPerforms the feature classification results. · Function: FeatureClassify(); FeatureClassifyPrediction(num, features)· Input: num is the num of advanced window; features is the feature type.· Outputs:o Classification performance o The sample set used for the current classification This function does not return any values.

创建时间:
2026-02-13
二维码
社区交流群
二维码
科研交流群
商业服务