.. _`matindex`: =================== CoSMoMVPA functions =================== .. toctree:: :maxdepth: 2 :hidden: matlab/cosmo_wizard_set_config matlab/cosmo_align matlab/cosmo_anova_feature_selector matlab/cosmo_average_samples matlab/cosmo_balance_dataset matlab/cosmo_balance_partitions matlab/cosmo_cartprod matlab/cosmo_check_dataset matlab/cosmo_check_external matlab/cosmo_check_neighborhood matlab/cosmo_check_partitions matlab/cosmo_chunkize matlab/cosmo_classify_knn matlab/cosmo_classify_lda matlab/cosmo_classify_libsvm matlab/cosmo_classify_matlabcsvm matlab/cosmo_classify_matlabsvm matlab/cosmo_classify_matlabsvm_2class matlab/cosmo_classify_meta_feature_selection matlab/cosmo_classify_naive_bayes matlab/cosmo_classify_nn matlab/cosmo_classify_svm matlab/cosmo_cluster_neighborhood matlab/cosmo_clusterize matlab/cosmo_config matlab/cosmo_confusion_matrix matlab/cosmo_convert_neighborhood matlab/cosmo_corr matlab/cosmo_correlation_measure matlab/cosmo_cross_neighborhood matlab/cosmo_crossvalidate matlab/cosmo_crossvalidation_measure matlab/cosmo_dataset_slice_fa matlab/cosmo_dataset_slice_sa matlab/cosmo_dim_find matlab/cosmo_dim_generalization_measure matlab/cosmo_dim_insert matlab/cosmo_dim_match matlab/cosmo_dim_prune matlab/cosmo_dim_remove matlab/cosmo_dim_rename matlab/cosmo_dim_slice matlab/cosmo_dim_transpose matlab/cosmo_dir matlab/cosmo_disp matlab/cosmo_dissimilarity_matrix_measure matlab/cosmo_distatis matlab/cosmo_find_local_extrema matlab/cosmo_flatten matlab/cosmo_fmri_convert_xform matlab/cosmo_fmri_dataset matlab/cosmo_fmri_deoblique matlab/cosmo_fmri_orientation matlab/cosmo_fmri_reorient matlab/cosmo_fx matlab/cosmo_independent_samples_partitioner matlab/cosmo_index_unique matlab/cosmo_interval_neighborhood matlab/cosmo_isequaln matlab/cosmo_isfield matlab/cosmo_make_temp_filename matlab/cosmo_map2fmri matlab/cosmo_map2meeg matlab/cosmo_map2surface matlab/cosmo_map_pca matlab/cosmo_mask_dim_intersect matlab/cosmo_match matlab/cosmo_measure_clusters matlab/cosmo_meeg_baseline_correct matlab/cosmo_meeg_chan_neighborhood matlab/cosmo_meeg_chan_neighbors matlab/cosmo_meeg_chantype matlab/cosmo_meeg_dataset matlab/cosmo_meeg_find_layout matlab/cosmo_meeg_layout_collection matlab/cosmo_meeg_read_layout matlab/cosmo_meeg_senstype2layout_mapping matlab/cosmo_meeg_senstype_collection matlab/cosmo_meta_feature_selection_classifier matlab/cosmo_montecarlo_cluster_stat matlab/cosmo_montecarlo_phase_stat matlab/cosmo_naive_bayes_classifier_searchlight matlab/cosmo_nchoosek_partitioner matlab/cosmo_neighborhood_split matlab/cosmo_nfold_partitioner matlab/cosmo_normalize matlab/cosmo_norminv matlab/cosmo_notify_test_skipped matlab/cosmo_oddeven_partitioner matlab/cosmo_overlap matlab/cosmo_parallel_get_nproc_available matlab/cosmo_parcellfun matlab/cosmo_pca matlab/cosmo_pdist matlab/cosmo_phase_itc matlab/cosmo_phase_stat matlab/cosmo_plot_slices matlab/cosmo_publish_run_scripts matlab/cosmo_rand matlab/cosmo_randomize_targets matlab/cosmo_randperm matlab/cosmo_remove_useless_data matlab/cosmo_run_tests matlab/cosmo_sample_unique matlab/cosmo_searchlight matlab/cosmo_set_path matlab/cosmo_show_progress matlab/cosmo_singleton_neighborhood matlab/cosmo_skip_test_if_no_external matlab/cosmo_slice matlab/cosmo_sphere_offsets matlab/cosmo_spherical_neighborhood matlab/cosmo_split matlab/cosmo_squareform matlab/cosmo_stack matlab/cosmo_stat matlab/cosmo_statcode matlab/cosmo_strjoin matlab/cosmo_strsplit matlab/cosmo_structjoin matlab/cosmo_surface_dataset matlab/cosmo_surficial_neighborhood matlab/cosmo_synthetic_dataset matlab/cosmo_tail matlab/cosmo_target_dsm_corr_measure matlab/cosmo_tiedrank matlab/cosmo_type matlab/cosmo_unflatten matlab/cosmo_vol_coordinates matlab/cosmo_vol_grid_convert matlab/cosmo_warning matlab/cosmo_winner_indices matlab/cosmo_wtf =============================================== ================================================================================================= ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Dataset input/output** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_check_dataset` Check consistency of a dataset. :ref:`cosmo_fmri_dataset` load an fmri volumetric dataset :ref:`cosmo_map2fmri` maps a dataset structure to a NIFTI, AFNI, or BV structure or file :ref:`cosmo_map2meeg` maps a dataset to a FieldTrip or EEGlab structure or file :ref:`cosmo_map2surface` maps a dataset structure to AFNI/SUMA NIML dset or BV SMP file :ref:`cosmo_meeg_dataset` Returns a dataset structure based on MEEG data :ref:`cosmo_surface_dataset` Returns a dataset structure based on surface mesh data :ref:`cosmo_synthetic_dataset` generate synthetic dataset ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Dataset operations** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_dim_insert` insert a dataset dimension :ref:`cosmo_dim_prune` prune dataset dimension values that are not used after slicing :ref:`cosmo_dim_remove` remove a dataset dimension :ref:`cosmo_dim_rename` rename dimension attribute name :ref:`cosmo_dim_transpose` move a dataset dimension from samples to features or vice versa :ref:`cosmo_slice` Slice a dataset by samples (the default) or features :ref:`cosmo_split` splits a dataset by unique values in (a) sample or feature attribute(s). :ref:`cosmo_stack` stacks multiple datasets to yield a single dataset ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Dataset processing** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_average_samples` average subsets of samples by unique combinations of sample attributes :ref:`cosmo_fx` apply a function to unique combinations of .sa or .fa values :ref:`cosmo_meeg_baseline_correct` correct baseline of MEEG dataset :ref:`cosmo_normalize` normalize dataset either by estimating or applying estimated parameters :ref:`cosmo_randomize_targets` provides randomized target labels :ref:`cosmo_remove_useless_data` remove 'useless' (constant and/or non-finite) samples or features ----------------------------------------------- ------------------------------------------------------------------------------------------------- **MEEG related functions** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_meeg_chan_neighborhood` determine neighborhood of channels in MEEG dataset :ref:`cosmo_meeg_chan_neighbors` find neighbors of MEEG channels :ref:`cosmo_meeg_chantype` return channel types and optionally a feature mask matching a type :ref:`cosmo_meeg_find_layout` finds an MEEG channel layout associated with a dataset :ref:`cosmo_meeg_layout_collection` return supported MEEG channel layouts :ref:`cosmo_meeg_read_layout` Read FieldTrip layout :ref:`cosmo_meeg_senstype2layout_mapping` return mapping from MEEG sensor types to sensor layouts :ref:`cosmo_meeg_senstype_collection` return supported MEEG acquisition systems and their channel labels ----------------------------------------------- ------------------------------------------------------------------------------------------------- **fMRI related functions** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_fmri_convert_xform` convert xform code between numeric and string in fmri dataset :ref:`cosmo_fmri_deoblique` de-oblique a dataset :ref:`cosmo_fmri_orientation` get orientation of a dataset :ref:`cosmo_fmri_reorient` Change the orientation of an fmri dataset :ref:`cosmo_vol_coordinates` convert to and from spatial (x,y,z) coordinates :ref:`cosmo_vol_grid_convert` convert between volumetric (fmri) and grid-based (meeg source) dataset ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Data visualization** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_disp` display the input as a string representation :ref:`cosmo_plot_slices` Plots a set of slices from a dataset, nifti image, or 3D data array ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Correlations** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_corr` Computes correlation - faster than than matlab's "corr" for Pearson. :ref:`cosmo_correlation_measure` Computes a split-half correlation measure ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Classification and cross-validation** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_classify_knn` k-nearest neighbor classifier :ref:`cosmo_classify_lda` linear discriminant analysis classifier - without prior :ref:`cosmo_classify_libsvm` libsvm-based SVM classifier :ref:`cosmo_classify_matlabsvm` SVM multi-classifier using matlab's SVM implementation :ref:`cosmo_classify_matlabsvm_2class` svm classifier wrapper (around svmtrain/svmclassify) :ref:`cosmo_classify_meta_feature_selection` meta classifier that uses feature selection on the training data :ref:`cosmo_classify_naive_bayes` naive bayes classifier :ref:`cosmo_classify_nn` nearest neighbor classifier :ref:`cosmo_classify_svm` classifier wrapper that uses either matlab's or libsvm's SVM. :ref:`cosmo_confusion_matrix` Returns a confusion matrix :ref:`cosmo_crossvalidate` performs cross-validation using a classifier :ref:`cosmo_crossvalidation_measure` performs cross-validation using a classifier :ref:`cosmo_winner_indices` Given multiple predictions, get indices that were predicted most often. ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Representational similarity analysis** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_dim_generalization_measure` measure generalization across pairwise combinations over time (or any other dimension) :ref:`cosmo_dissimilarity_matrix_measure` Compute a dissimilarity matrix measure :ref:`cosmo_distatis` apply DISTATIS measure to each feature :ref:`cosmo_pdist` compute pair-wise distance between samples in a matrix :ref:`cosmo_squareform` converts pair-wise distances between matrix and vector form :ref:`cosmo_target_dsm_corr_measure` measure correlation with target dissimilarity matrix ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Partitioning (for cross-validation)** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_balance_partitions` balances a partition so that each target occurs equally often in each training and test chunk :ref:`cosmo_check_partitions` check whether partitions are balanced and not double-dippy :ref:`cosmo_check_partitions` check whether partitions are balanced and not double-dippy :ref:`cosmo_chunkize` assigns chunks that are as balanced as possible based on targets. :ref:`cosmo_independent_samples_partitioner` Compute partitioning scheme based on dataset with independent samples :ref:`cosmo_nchoosek_partitioner` partitions for into nchoosek(n,k) parititions with optional grouping schemas. :ref:`cosmo_nfold_partitioner` generates an n-fold partition scheme :ref:`cosmo_oddeven_partitioner` generates an odd-even partition scheme ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Neighborhoods and searchlight** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_cross_neighborhood` cross neighborhoods along dataset dimensions :ref:`cosmo_interval_neighborhood` compute neighborhoods stretching intervals :ref:`cosmo_meeg_chan_neighborhood` determine neighborhood of channels in MEEG dataset :ref:`cosmo_naive_bayes_classifier_searchlight` Run (fast) Naive Bayes classifier searchlight with crossvalidation :ref:`cosmo_neighborhood_split` partitions a neighborhood in a cell with (smaller) neigborhoods :ref:`cosmo_searchlight` Generic searchlight function returns a map of results computed at each searchlight location :ref:`cosmo_sphere_offsets` computes sub index offsets for voxels in a sphere :ref:`cosmo_spherical_neighborhood` computes neighbors for a spherical searchlight :ref:`cosmo_surficial_neighborhood` neighborhood definition for surface-based searchlight ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Feature-based clustering** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_check_neighborhood` check that a neighborhood is kosher :ref:`cosmo_cluster_neighborhood` define neighborhood suitable for cluster-based analysis :ref:`cosmo_clusterize` fast depth-first clustering based on equal values of neighbors :ref:`cosmo_convert_neighborhood` Converts between cell, matrix and struct representations of neighborhoods :ref:`cosmo_find_local_extrema` find local extrema in a dataset using a neighborhood :ref:`cosmo_measure_clusters` General cluster measure :ref:`cosmo_montecarlo_cluster_stat` compute random-effect cluster statistics corrected for multiple comparisons ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Univariate statistics** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_anova_feature_selector` find the features that show the most variance between classes :ref:`cosmo_stat` compute t-test or F-test (ANOVA) statistic :ref:`cosmo_statcode` Convert statcode for different analysis packages ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Utility functions** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_align` find permutation so that values in two inputs are matched :ref:`cosmo_cartprod` returns the cartesian product with all combinations of the input :ref:`cosmo_dim_find` find dimension attribute in dataset :ref:`cosmo_dim_match` return a mask indicating match of dataset dimensions with values :ref:`cosmo_index_unique` index unique (combinations of) elements :ref:`cosmo_isequaln` compares two input for equality with NaNs considered being equal :ref:`cosmo_isfield` checks the presence of (possibly nested) fieldnames in a struct :ref:`cosmo_map_pca` normalize dataset either by estimating or applying estimated parameters :ref:`cosmo_mask_dim_intersect` find intersection mask across a set of datasets :ref:`cosmo_match` returns a mask indicating matching occurences in two arrays or cells relative to the second array :ref:`cosmo_overlap` compute overlap between vectors or cellstrings in two cells :ref:`cosmo_pca` Principal Component Analysis :ref:`cosmo_rand` generate uniform pseudo-random numbers, optionally using a seed value :ref:`cosmo_randperm` generate random permutation of integers :ref:`cosmo_sample_unique` sample without replacement from subsets of integers in balanced manner :ref:`cosmo_strjoin` joins strings using a delimeter string :ref:`cosmo_strsplit` splits a string based on another delimeter string :ref:`cosmo_structjoin` joins values in structs or key-value pairs :ref:`cosmo_tail` find values in left or right tail of a vector or string ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Misceleanous helper functions** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_check_external` Checks whether a certain external toolbox exists, or list citation info :ref:`cosmo_config` return a struc with configuration settings, or store such settings :ref:`cosmo_config` return a struc with configuration settings, or store such settings :ref:`cosmo_dir` list files recursively in a directory :ref:`cosmo_flatten` flattens an arbitrary array to a dataset structure :ref:`cosmo_parallel_get_nproc_available` get number of processes available from Matlab parallel processing pool :ref:`cosmo_parcellfun` applies a function to elements in a cell in parallel :ref:`cosmo_set_path` set the matlab path for CoSMoMVPA :ref:`cosmo_show_progress` Shows a progress bar, and time elapsed and expected to complete. :ref:`cosmo_type` print or return ASCII contents of a file :ref:`cosmo_unflatten` unflattens a dataset from 2 to (1+K) dimensions. :ref:`cosmo_warning` show a warning message; by default just once for each message :ref:`cosmo_wizard_set_config` GUI-based 'wizard' to set CoSMoMVPA configuration file ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Developer functions** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_make_temp_filename` give temporary filename that does not exist when this function is called :ref:`cosmo_notify_test_skipped` notify that a test in the test suite is skipped :ref:`cosmo_publish_run_scripts` helper function to publish example scripts (for developers) :ref:`cosmo_run_tests` run unit and documentation tests :ref:`cosmo_skip_test_if_no_external` Notify that test in the test suite is skipped if no external is present :ref:`cosmo_wtf` return system, toolbox and externals information ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Deprecated - to be removed in the future** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_dataset_slice_fa` Slice a dataset by features (columns) [deprecated] :ref:`cosmo_dataset_slice_sa` Slice a dataset by samples (rows) [deprecated] :ref:`cosmo_dim_slice` slice and prune a dataset with dimension attributes [deprecated] :ref:`cosmo_meta_feature_selection_classifier` meta classifier that uses feature selection on the training data [deprecated] ----------------------------------------------- ------------------------------------------------------------------------------------------------- **Other functions (possibly experimental)** ----------------------------------------------- ------------------------------------------------------------------------------------------------- :ref:`cosmo_montecarlo_phase_stat` compute phase statistics based on Monte Carlo simulation :ref:`cosmo_norminv` compute inverse normal cumulative distribution function :ref:`cosmo_phase_itc` compute phase inter trial coherence :ref:`cosmo_tiedrank` Compute ranks for the input along the specified dimension :ref:`cosmo_classify_matlabcsvm` svm classifier wrapper (around fitcsvm) :ref:`cosmo_balance_dataset` sub-sample a dataset to have an equal number of samples for each target :ref:`cosmo_singleton_neighborhood` return neighborhood where each feature is only neighbor of itself :ref:`cosmo_phase_stat` Compute phase perturbation, or opposition sum or product phase statistic =============================================== =================================================================================================