MCPcopy Create free account

hub / github.com/MarcCoru/locationencoder / functions

Functions175 in github.com/MarcCoru/locationencoder

↓ 10 callersFunctionparse_resultsdir
(args)
experiments/exp_era5.py:84
↓ 10 callersFunctionplot_predictions
convenience function to plot a regular grid of lon lat coordinates
utils/plot_results.py:9
↓ 9 callersFunctionparse_resultsdir
(args)
utils/utils.py:3
↓ 7 callersFunctionexists
(val)
locationencoder/nn/siren.py:9
↓ 7 callersFunctionlog_loss
(pred)
utils/losses.py:23
↓ 6 callersFunctionfit
(args)
train.py:111
↓ 5 callersMethodforward
(self, coords)
locationencoder/pe/wrap.py:17
↓ 5 callersFunctiongenerate_fibonaccilattice
(N, n_classes=16)
data/checkerboarddataset.py:12
↓ 5 callersMethodtest_dataloader
(self)
data/era5dataset.py:103
↓ 4 callersMethod__init__
(self, w0 = 1.)
locationencoder/nn/siren.py:18
↓ 4 callersMethodtrain_dataloader
(self)
data/era5dataset.py:97
↓ 3 callersFunctionSH_renormalization
(l, m)
locationencoder/pe/spherical_harmonics_closed_form.py:28
↓ 3 callersFunctionassociated_legendre_polynomial
(l, m, x)
locationencoder/pe/spherical_harmonics_closed_form.py:8
↓ 3 callersMethodcommon_step
(self, batch, batch_idx)
locationencoder/imageencoder.py:24
↓ 3 callersMethodcommon_step
(self, batch, batch_idx)
locationencoder/locationimageencoder.py:31
↓ 3 callersFunctionget_data
(N_samples, N_support, n_classes, seed=0, grid=False, random_classes=False)
data/checkerboarddataset.py:209
↓ 3 callersFunctionget_data
(N=5000, seed=0, grid=False)
data/landoceandataset.py:65
↓ 3 callersFunctionget_param
Convenience function that indexes the hyperparameter dict but returns a default value if not defined rather than an error
locationencoder/locationencoder.py:64
↓ 3 callersFunctionhaversine_distance
Calculates the pairwise Haversine distances between each point pair. Args: lon1 (numpy.ndarray): The longitudes of the first set of
data/checkerboarddataset.py:78
↓ 3 callersFunctionload_inat_location_data
(ip_dir, loc_file_name, ann_file_name, remove_empty=True)
data/inat2018_loader.py:202
↓ 2 callersFunctionSH
(m, l, phi, theta)
locationencoder/pe/spherical_harmonics_closed_form.py:32
↓ 2 callersFunction_cal_freq_list
(freq_init, frequency_num, max_radius, min_radius)
locationencoder/pe/common.py:4
↓ 2 callersFunctionassign_closest_label
assigns the label of lons, lats, to the closest lons_grid, lats_grid point
data/checkerboarddataset.py:102
↓ 2 callersMethodcal_elementwise_angle
Args: coord: the deltaX or deltaY cur_freq: the frequency
locationencoder/pe/grid_and_sphere.py:53
↓ 2 callersMethodcommon_step
(self, batch, batch_idx)
locationencoder/locationencoder.py:96
↓ 2 callersFunctioncount_parameters
(model)
utils/utils.py:44
↓ 2 callersFunctioncount_parameters
(model)
experiments/exp_era5.py:122
↓ 2 callersFunctionfind_best_checkpoint
searches a directory for checkpoints following a pattern (e.g., sphericalharmonics-siren) and returns the one with lowest val_loss. checkpoint
utils/utils.py:13
↓ 2 callersFunctionfind_best_checkpoint
searches a directory for checkpoints following a pattern (e.g., sphericalharmonics-siren) and returns the one with lowest val_loss. checkpoint
experiments/exp_era5.py:93
↓ 2 callersMethodforward
(self, lonlats)
locationencoder/locationencoder.py:100
↓ 2 callersFunctionget_data_points
(N=5000, seed=0, cache=True, sphericaluniform=True, grid=False)
data/landoceandataset.py:26
↓ 2 callersFunctionget_random_lonlats
samples random points on the sphere returns [N x 2] tensor of lon, lat coordinates in degree
utils/losses.py:14
↓ 2 callersMethodget_test_locs
(self)
data/era5dataset.py:106
↓ 2 callersFunctionplot_comp
(df, ydim="test_duration")
experiments/exp_computation.py:147
↓ 2 callersFunctionplot_longitudinal_accuracy
(trainer, model, matplotlib=False, show=False, N_bins = 9, savepath=None)
utils/plot_longitudinal_accuracy.py:5
↓ 2 callersFunctionplot_predictions_at_points
convenience function to plot a scatter plot of values at lonlats
utils/plot_results.py:69
↓ 2 callersFunctionplot_sh
(df, ydim="test_duration")
experiments/exp_computation.py:131
↓ 1 callersMethod__init__
(self, root, ann_file, is_train=True, return_location=False, logits_file=None)
data/inat2018_loader.py:57
↓ 1 callersMethod__init__
(self, num_inputs, num_classes, dim_hidden)
locationencoder/nn/fcnet.py:28
↓ 1 callersFunctionarea_per_point
(N, r=6371)
data/checkerboarddataset.py:196
↓ 1 callersMethodcal_embedding_dim
(self)
locationencoder/pe/grid_and_sphere.py:71
↓ 1 callersMethodcal_embedding_dim
(self)
locationencoder/pe/theory.py:54
↓ 1 callersMethodcal_freq_list
(self)
locationencoder/pe/grid_and_sphere.py:85
↓ 1 callersMethodcal_freq_list
(self)
locationencoder/pe/theory.py:45
↓ 1 callersMethodcal_freq_mat
(self)
locationencoder/pe/grid_and_sphere.py:88
↓ 1 callersMethodcal_freq_mat
(self)
locationencoder/pe/theory.py:48
↓ 1 callersFunctioncalc_avg_distances
(N, unit="deg")
data/checkerboarddataset.py:205
↓ 1 callersFunctioncalc_ylm
see last equation of https://en.wikipedia.org/wiki/Spherical_harmonics#Real_form
locationencoder/pe/spherical_harmonics_generate_ylms.py:19
↓ 1 callersFunctioncalculate_average_distance_between_closest_neighbors
(lons, lats, unit="km")
data/checkerboarddataset.py:175
↓ 1 callersFunctioncart2sph
(x, y, z)
utils/losses.py:7
↓ 1 callersFunctioncart2sph
(x, y, z)
data/checkerboarddataset.py:71
↓ 1 callersFunctioncart2sph
(x, y, z)
data/landoceandataset.py:19
↓ 1 callersFunctioncast_tuple
(val, repeat = 1)
locationencoder/nn/siren.py:12
↓ 1 callersFunctioncompile_summaries
(dataset)
tune.py:126
↓ 1 callersFunctiondraw_globe
(y, lonlats, plot_points, title)
utils/plot_results.py:176
↓ 1 callersFunctiondraw_map
(y, plot_points, title, bds=[-180,-90,180,90])
utils/plot_results.py:153
↓ 1 callersFunctionextract_comp_df
(results_dir, dataset)
experiments/exp_computation.py:97
↓ 1 callersFunctionextract_df_to_csv
(resultsdir)
experiments/exp_longitudinal_accuracy.py:50
↓ 1 callersFunctionextract_sh_df
(results_dir, dataset)
experiments/exp_computation.py:68
↓ 1 callersFunctionfind_matrix_plot_filename
(resultsdir, pe, nn)
utils/plot_results.py:210
↓ 1 callersFunctionfit
(args)
experiments/exp_era5.py:125
↓ 1 callersFunctionfit_models
(args)
experiments/exp_quantitative.py:103
↓ 1 callersFunctionfit_models
()
experiments/exp_longitudinal_accuracy.py:22
↓ 1 callersMethodget_coeffs
convenience function to store two triangle matrices in one where m can be negative
locationencoder/pe/discretized_spherical_harmonics.py:44
↓ 1 callersFunctionget_era5
(data_dir, label_key, remove_nans=True, normalize=True)
data/era5dataset.py:13
↓ 1 callersFunctionget_era5_data_by_split
(data_root,label_key="t2m",random_seed=0)
data/era5dataset.py:76
↓ 1 callersFunctionget_hyperparameter
(trial: optuna.trial.Trial, positional_encoding_name, neural_network_name)
tune.py:15
↓ 1 callersFunctionget_loss_fn
generate a loss function :param presence_only: if True, calculate presence-only loss as in Cole and al., 2023 :param loss_weight: weight
utils/losses.py:26
↓ 1 callersFunctionget_neural_network
(name, input_dim, hparams=None)
locationencoder/locationencoder.py:44
↓ 1 callersFunctionget_positional_encoding
(name, hparams=None)
locationencoder/locationencoder.py:14
↓ 1 callersMethodinit_
(self, weight, bias, c, w0)
locationencoder/nn/siren.py:42
↓ 1 callersFunctioninterpolate_pixel_values
(image, points)
locationencoder/pe/discretized_spherical_harmonics.py:67
↓ 1 callersFunctionload_taxonomy
(ann_data, tax_levels, classes)
data/inat2018_loader.py:31
↓ 1 callersFunctionmain
()
data/checkerboarddataset.py:109
↓ 1 callersFunctionmain
()
experiments/exp_computation.py:163
↓ 1 callersFunctionmain
()
experiments/exp_resolution.py:12
↓ 1 callersFunctionmain
()
experiments/exp_quantitative.py:30
↓ 1 callersFunctionmain
()
experiments/exp_longitudinal_accuracy.py:8
↓ 1 callersFunctionoverwrite_hparams_with_args
(hparams, args)
train.py:35
↓ 1 callersFunctionoverwrite_hparams_with_args
(hparams, args)
experiments/exp_era5.py:27
↓ 1 callersFunctionparse_args
()
train.py:52
↓ 1 callersFunctionparse_args
()
experiments/exp_era5.py:43
↓ 1 callersFunctionparse_args
()
experiments/exp_quantitative.py:9
↓ 1 callersFunctionplot_summary
(resultsdir, neuralnet, savepath=None)
experiments/exp_longitudinal_accuracy.py:93
↓ 1 callersFunctionprint_function
(l, m)
locationencoder/pe/spherical_harmonics_generate_ylms.py:37
↓ 1 callersFunctionscatter_plot_gdf
(gdf, plot_key, plot_map=True, ax=None, plot_kwargs={}, title='')
utils/plot_results.py:128
↓ 1 callersFunctionset_default_if_unset
(hparams, key, value)
utils/utils.py:38
↓ 1 callersFunctionset_default_if_unset
(hparams, key, value)
experiments/exp_era5.py:117
↓ 1 callersFunctionsplit_era5_dataframe
(df, label_key, random_seed=0 ,train_size=0.01,val_size=0.05)
data/era5dataset.py:43
↓ 1 callersFunctiontune
(positional_encoding_name, neural_network_name, dataset="landoceandataset")
tune.py:49
FunctionAN_loss
The simple "assume negative" loss from Cole and al., 2021. This is the standard cross-entropy loss.
utils/losses.py:119
FunctionMSE_loss
MSE on logits.
utils/losses.py:43
FunctionSH_
(args)
locationencoder/pe/discretized_spherical_harmonics.py:5
FunctionSLDS_loss
The "assume negative" loss (same location, different species) from Cole and al., 2023.
utils/losses.py:52
FunctionSSDL_loss
The "assume negative" loss (same species, different location) from Cole and al., 2023.
utils/losses.py:66
Method__getitem__
(self, index)
data/inat2018_loader.py:124
Method__init__
(self, num_samples=5000, batch_size=1000, num_classes = 4, num_support = 200)
data/checkerboarddataset.py:236
Method__init__
(self, num_workers=0, batch_size=1000,data_root='/home/kklemmer/sphericalharmonics/data/era5', label_key='t2m'
data/era5dataset.py:81
Method__init__
(self, num_samples=5000, batch_size=1000)
data/landoceandataset.py:79
Method__init__
(self, root, batch_size=2000, mode="location", num_workers=0)
data/inat2018_loader.py:269
next →1–100 of 175, ranked by callers