Skip to content

in1311/DKNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DKNN

This is a pytorch implementation of DKNN: deep kriging neural network for interpretable geospatial interpolation DKNN framework

Requirements

  • numpy
  • datetime
  • os
  • pandas
  • torch
  • tensorboard
  • sklearn
  • matplotlib
  • math
  • tqdm

Running examples

python main.py

You can adjust the parameters:

  • datafile: sampled dataset in folder "Data/dataset"
  • batch_size: batch size
  • lr: learning rate
  • hidden_neuron: [input dimension, model dimension, trend dimension]. Note that the input dimension should be equal to the number of all variables (auxiliary and target) in the dataset
  • pe_weight: weight of positional vector
  • top_k: top k nearest neighbors
  • loss_type: loss function type
  • optim_type: optimizer type
  • if_summary: if save the training summary or not
  • if_save_model: if save the best model or not

Or you can run the demo.ipynb file, which encompasses code blocks for data loading, preprocessing, model initialization, training, and predicting, providing a more comprehensive running example.

The train log and results are saved in folder "results"

Please note that we tested the code on machines equipped with NVIDIA RTX4090 GPU and RTX3060 GPU. We recommend utilizing GPU for running our provided code examples, and different device conditions may affect the results.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published