plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | zzlyw/machine-learning-exercises-master | saveubjson.m | .m | machine-learning-exercises-master/machine-learning-ex3/ex3/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | zzlyw/machine-learning-exercises-master | submit.m | .m | machine-learning-exercises-master/machine-learning-ex8/ex8/submit.m | 2,135 | utf_8 | eebb8c0a1db5a4df20b4c858603efad6 | function submit()
addpath('./lib');
conf.assignmentSlug = 'anomaly-detection-and-recommender-systems';
conf.itemName = 'Anomaly Detection and Recommender Systems';
conf.partArrays = { ...
{ ...
'1', ...
{ 'estimateGaussian.m' }, ...
'Estimate Gaussian Parameters', ...
}, ...
{ ...... |
github | zzlyw/machine-learning-exercises-master | submitWithConfiguration.m | .m | machine-learning-exercises-master/machine-learning-ex8/ex8/lib/submitWithConfiguration.m | 5,562 | utf_8 | 4ac719ea6570ac228ea6c7a9c919e3f5 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | zzlyw/machine-learning-exercises-master | savejson.m | .m | machine-learning-exercises-master/machine-learning-ex8/ex8/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | zzlyw/machine-learning-exercises-master | loadjson.m | .m | machine-learning-exercises-master/machine-learning-ex8/ex8/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | zzlyw/machine-learning-exercises-master | loadubjson.m | .m | machine-learning-exercises-master/machine-learning-ex8/ex8/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | zzlyw/machine-learning-exercises-master | saveubjson.m | .m | machine-learning-exercises-master/machine-learning-ex8/ex8/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | zzlyw/machine-learning-exercises-master | submit.m | .m | machine-learning-exercises-master/machine-learning-ex1/ex1/submit.m | 1,876 | utf_8 | 8d1c467b830a89c187c05b121cb8fbfd | function submit()
addpath('./lib');
conf.assignmentSlug = 'linear-regression';
conf.itemName = 'Linear Regression with Multiple Variables';
conf.partArrays = { ...
{ ...
'1', ...
{ 'warmUpExercise.m' }, ...
'Warm-up Exercise', ...
}, ...
{ ...
'2', ...
{ 'computeCost.m... |
github | zzlyw/machine-learning-exercises-master | submitWithConfiguration.m | .m | machine-learning-exercises-master/machine-learning-ex1/ex1/lib/submitWithConfiguration.m | 5,562 | utf_8 | 4ac719ea6570ac228ea6c7a9c919e3f5 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | zzlyw/machine-learning-exercises-master | savejson.m | .m | machine-learning-exercises-master/machine-learning-ex1/ex1/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | zzlyw/machine-learning-exercises-master | loadjson.m | .m | machine-learning-exercises-master/machine-learning-ex1/ex1/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | zzlyw/machine-learning-exercises-master | loadubjson.m | .m | machine-learning-exercises-master/machine-learning-ex1/ex1/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | zzlyw/machine-learning-exercises-master | saveubjson.m | .m | machine-learning-exercises-master/machine-learning-ex1/ex1/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | mcubelab/push-est-public-master | savejson.m | .m | push-est-public-master/catkin_ws/src/pnpush_planning/src/analyze/matlab/Json/fsroot/jsonlab/savejson.m | 17,893 | utf_8 | e6ce3747006d07076995e00a8b14623a | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | mcubelab/push-est-public-master | loadjson.m | .m | push-est-public-master/catkin_ws/src/pnpush_planning/src/analyze/matlab/Json/fsroot/jsonlab/loadjson.m | 16,170 | ibm852 | 2fc3bbe9aed7b4b05de8b391f0f744b3 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | mcubelab/push-est-public-master | loadubjson.m | .m | push-est-public-master/catkin_ws/src/pnpush_planning/src/analyze/matlab/Json/fsroot/jsonlab/loadubjson.m | 13,346 | utf_8 | 4f30b406868398bdc5d594a6ae042e6b | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 492 2015-06-... |
github | mcubelab/push-est-public-master | saveubjson.m | .m | push-est-public-master/catkin_ws/src/pnpush_planning/src/analyze/matlab/Json/fsroot/jsonlab/saveubjson.m | 16,440 | utf_8 | 4bf8d44968ce0b316dbc21afe2d446f9 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | mdreisbach/Predictive-Maintenance-System-master | trainClassifier.m | .m | Predictive-Maintenance-System-master/MATLAB Prototype Source Code/trainClassifier.m | 6,766 | utf_8 | 514538a24da1b418974f7075d48e5310 | %Code to dynmically set the file path for files used
currentDir = pwd;
splitDir = strsplit(currentDir, 'Predictive_Maintenance_System');
rootDir = splitDir(1);
finalPath = strcat(rootDir, 'Predictive_Maintenance_System\Files\Training_Data\dataMeasurementFull.csv');
pathToLoad = char(finalPath);
%Training data
... |
github | mdreisbach/Predictive-Maintenance-System-master | PCA_Function_Testing.m | .m | Predictive-Maintenance-System-master/MATLAB Prototype Source Code/PCA_Function_Testing.m | 2,163 | utf_8 | 03277efd5cc31d7f4076d1605041f1ae | %Code to dynmically set the file path for files used
currentDir = pwd;
splitDir = strsplit(currentDir, 'Predictive_Maintenance_System');
rootDir = splitDir(1);
finalPath = strcat(rootDir, 'Predictive_Maintenance_System\Files\Current_File\data.csv');
pathToLoad = char(finalPath);
%Read in ship speed from an edit... |
github | mdreisbach/Predictive-Maintenance-System-master | PCA_Classification_Function.m | .m | Predictive-Maintenance-System-master/MATLAB Prototype Source Code/PCA_Classification_Function.m | 4,337 | utf_8 | fc5e33674a807c11d64d149b7dd9c960 | %Code to dynmically set the file path for files used
currentDir = pwd;
splitDir = strsplit(currentDir, 'Predictive_Maintenance_System');
rootDir = splitDir(1);
finalPath = strcat(rootDir, 'Predictive_Maintenance_System\Files\Current_File\data.csv');
pathToLoad = char(finalPath);
%Read in ship speed from an edit... |
github | CohenBerkeleyLab/BEHR-core-master | coart_sea_reflectance.m | .m | BEHR-core-master/Albedo/coart_sea_reflectance.m | 4,146 | utf_8 | 48a0832c253ee8306bd4cd45a194c92c | function [ refl, refl_struct ] = coart_sea_reflectance( sza, refl_struct )
%COART_SEA_REFLECTANCE Calculate sea surface reflectance from the COART LUT
% The COART (Coupled Atmosphere-Ocean Radiative Transfer) model allows
% for simulation of light interacting with the surface of the ocean. The
% model is hosted o... |
github | CohenBerkeleyLab/BEHR-core-master | mobley_sea_refl.m | .m | BEHR-core-master/Albedo/mobley_sea_refl.m | 6,327 | utf_8 | aac340549615ee5b0f3dda6fc5e834ac | function [ refl, refl_struct ] = mobley_sea_refl( sza, vza, raa, refl_struct )
%MODIS_SEA_REFL Look up sea reflectivity from Mobley 2015
% The MCD43C1 product does not give BRDF coefficients over ocean.
% Vasilkov et al. (2017) handled this by using two models that combined
% direct (specular) and volumetric refl... |
github | CohenBerkeleyLab/BEHR-core-master | behr_uncertainty_estimation.m | .m | BEHR-core-master/Utils/behr_uncertainty_estimation.m | 5,935 | utf_8 | 5f40f34fe8818e277997bac9ac1e5dc3 | function [ Delta, DeltaGrid ] = behr_uncertainty_estimation( Data, OMI, parameter, percent_change, varargin )
%BEHR_UNCERTAINTY_ESTIMATION Estimate the uncertainty in BEHR NO2
% [ DELTA, DELTAGRID ] = BEHR_UNCERTAINTY_ESTIMATION( DATA, PARAMETER, PERCENT_CHANGE )
% This function will run the BEHR retrieval for the ... |
github | CohenBerkeleyLab/BEHR-core-master | behr_generate_uncertainty_files.m | .m | BEHR-core-master/Utils/behr_generate_uncertainty_files.m | 9,882 | utf_8 | 7bb92109dbade18e03ba7e931c08b75c | function behr_generate_uncertainty_files(varargin)
%BEHR_GENERATE_UNCERTAINTY_FILES Generate the intermediate files for BEHR uncertainty analysis
% BEHR_GENERATURE_UNCERTAINTY_FILES( ) Generates files containing Delta
% and DeltaGrid structures, which are generated by
% BEHR_UNCERTAINTY_ESTIMATION() and contain ... |
github | CohenBerkeleyLab/BEHR-core-master | globe_fix_16aug2016.m | .m | BEHR-core-master/Utils/Fixes/globe_fix_16aug2016.m | 5,187 | utf_8 | 98e0a4c51be32f132cd763d4f9204d0a | function [ ] = globe_fix_16aug2016( start_date, end_date )
%GLOBE_FIX_16AUG2016 Fixes an issue with sea-level GLOBE terrain pressure
% Pixels over ocean in BEHR have a GLOBETerpres value of ~1080 hPa, which
% is wrong. This happens because a fill value of -500 snuck into the
% terrain altitude at the beginning w... |
github | CohenBerkeleyLab/BEHR-core-master | BEHR_main.m | .m | BEHR-core-master/BEHR_Main/BEHR_main.m | 10,293 | utf_8 | 663701aa5d6628aa878f67282cd23047 | function BEHR_main(varargin)
% BEHR_MAIN: primary BEHR algorithm
%
% This function is the primary BEHR algorithm, it takes the OMI, MODIS,
% and GLOBE data read in by read_main.m and uses it to
% recalculated the BEHR AMFs and VCDs. There are a number of input
% parameters that control it's operation; the defau... |
github | CohenBerkeleyLab/BEHR-core-master | BEHR_InSitu_Reprocessing.m | .m | BEHR-core-master/BEHR_Main/BEHR_InSitu_Reprocessing.m | 19,539 | utf_8 | 33e57f621d7db8046bd19a76ce7e0c85 | function BEHR_InSitu_Reprocessing
%BEHR_InSitu_Reprocessing
%
% This script will take aircraft data and use it to recalculate AMFs and
% produce a new satellite column using that AMF.
%
% Returns a quality flag with each bit representing a specific warning
% about the data. These mimic the flags in the spiral ... |
github | CohenBerkeleyLab/BEHR-core-master | BEHR_main_one_day.m | .m | BEHR-core-master/BEHR_Main/BEHR_main_one_day.m | 20,226 | utf_8 | 1dc50e019931e401cee177df318402ba | function [ Data, OMI ] = BEHR_main_one_day( Data, varargin )
%BEHR_MAIN_ONE_DAY The BEHR algorithm for a single day's data.
% [ DATA, OMI ] = BEHR_main_one_day( DATA ) Takes as input a DATA
% structure created by READ_MAIN() and calculates BEHR AMFs for it as
% well as grids the data using the BEHR-PSM repository... |
github | CohenBerkeleyLab/BEHR-core-master | BEHR_publishing_main.m | .m | BEHR-core-master/HDF tools/BEHR_publishing_main.m | 27,750 | utf_8 | 94c9f8d5b73d10d19844b4b0963dd564 | function [ ] = BEHR_publishing_main(varargin)
%BEHR_publishing_v2 Create the HDF files for BEHR products
% BEHR_Publishing_v2 can accept a number of input parameters to alter its
% behavior. All of these have default values that are set up so that
% calling it without parameters will lead to standard behavior. T... |
github | CohenBerkeleyLab/BEHR-core-master | unit_test_maps.m | .m | BEHR-core-master/Production tests/unit_test_maps.m | 10,920 | utf_8 | 9323df8af9a3024ee2a617478e802d36 | function unit_test_maps(ut_base_dir, ut_new_dir, fields, varargin)
%UNIT_TEST_MAPS Make maps of the differences between two unit tests
% UNIT_TEST_MAPS() will interactively request all the necessary options
%
% UNIT_TEST_MAPS( UT_BASE_DIR, UT_NEW_DIR, FIELDS ) will read the
% OMI_BEHR .mat files from UT_BASE_DIR... |
github | CohenBerkeleyLab/BEHR-core-master | behr_prod_indiv_scatter.m | .m | BEHR-core-master/Production tests/behr_prod_indiv_scatter.m | 4,787 | utf_8 | 5b21fe91d4d125ee89fa2c10e9b0e151 | function [ output_args ] = behr_prod_indiv_scatter( indiv_stats, field_to_plot, plot_mode, clim )
%BEHR_PROD_INDIV_SCATTER Plots day by day scatter plots where % diff > 0.5
% BEHR_PROD_INDIV_SCATTER( indiv_stats, field_to_plot ) makes plots for
% FIELD_TO_PLOT from INDIV_STATS returned by BEHR_PROD_TEST.
%
% BEHR... |
github | CohenBerkeleyLab/BEHR-core-master | behr_unit_test.m | .m | BEHR-core-master/Production tests/behr_unit_test.m | 7,538 | utf_8 | b75018aec9fbc90e90e27f4421563f03 | function [ success ] = behr_unit_test( new, old, DEBUG_LEVEL, fid, fields_to_ignore )
%BEHR_UNIT_TEST Compare old and new BEHR data
% SUCCESS = BEHR_UNIT_TEST( NEW, OLD )
% Takes two Data or OMI structures (NEW and OLD) and compares the values
% of each field in the structures. If everything matches, SUCCESS wil... |
github | CohenBerkeleyLab/BEHR-core-master | match_hdf_txt.m | .m | BEHR-core-master/Production tests/match_hdf_txt.m | 2,069 | utf_8 | 4e36dd7ab06cf74f27b6d2519e61a780 | function [ DataHDF, DataTXT ] = match_hdf_txt( hdffile, txtfile, fields )
%MATCH_HDF_TEXT Matches up data in a text file to the array shape in an HDF file
% [ DATAHDF, DATATXT ] = MATCH_HDF_TEXT( HDFFILE, TXTFILE, FIELDS )
% will read data from the files at paths HDFFILE and TXTFILE and return
% structures DATAHD... |
github | CohenBerkeleyLab/BEHR-core-master | prod_test_load_txt.m | .m | BEHR-core-master/Production tests/prod_test_load_txt.m | 3,292 | utf_8 | 4f07eee69c6989d9c390de494a2df25f | function [ D_new, fillvals ] = prod_test_load_txt( newfile, fields_to_check )
%[ D_NEW, D_OLD, FILLVALS ] = PROD_TEST_LOAD_TXT( NEWFILE, FIELDS_TO_CHECK )
% This function will load a BEHR .txt file and return the data in
% structures like those used in the .mat files. However, because of how
% the .txt files are ... |
github | CohenBerkeleyLab/BEHR-core-master | unit_test_driver.m | .m | BEHR-core-master/Production tests/unit_test_driver.m | 34,802 | utf_8 | 3600c57f1f66581c5e3556be96eee790 | function [ ] = unit_test_driver( self_test )
%UNIT_TEST_DRIVER Driver function for BEHR unit test
% This function, when called, asks a series of questions interactively to
% determine how the unit tests should proceed. It is capable of
% automatically generating OMI_SP and OMI_BEHR files using the current
% ve... |
github | CohenBerkeleyLab/BEHR-core-master | prod_test_load_hdf.m | .m | BEHR-core-master/Production tests/prod_test_load_hdf.m | 2,939 | utf_8 | 389542dd60ee66619d6623b673b18072 | function [ D_new, fill_vals ] = prod_test_load_hdf( newfile, fields_to_check )
%[ D_NEW, D_OLD ] = PROD_TEST_LOAD_HDF( NEWFILE, FIELDS_TO_CHECK )
% This function will load a BEHR HDF file and return the data in
% structures like those used in the .mat files. NEWFILE and OLDFILE must
% be strings pointing to the n... |
github | CohenBerkeleyLab/BEHR-core-master | behr_prod_test.m | .m | BEHR-core-master/Production tests/behr_prod_test.m | 21,793 | utf_8 | 26e1d6d8f368c0fde51a20e3fbbd8098 | function [ indiv_stats, overall_stats ] = behr_prod_test( varargin )
%[ INDIV_STATS, OVERALL_STATS] = BEHR_PROD_TEST()
% Tests a sample of OMI_BEHR files for differences. Whenever making a new
% version of BEHR, it's good to do some basic checking to make sure that
% the differences are what you expect. This f... |
github | CohenBerkeleyLab/BEHR-core-master | reading_priori_tests.m | .m | BEHR-core-master/Production tests/SubTests/reading_priori_tests.m | 7,747 | utf_8 | 95a338f40c0e0d0b250be423875e7725 | function [ success ] = reading_priori_tests( data, DEBUG_LEVEL, fid )
%READING_PRIORI_TESTS Sanity check of data imported from NASA SP 2, etc.
% Detailed explanation goes here
if ~exist('DEBUG_LEVEL', 'var')
DEBUG_LEVEL = 2;
end
if ~exist('fid', 'var')
% An fid of 1 will make fprint print to the command win... |
github | CohenBerkeleyLab/BEHR-core-master | main_priori_tests.m | .m | BEHR-core-master/Production tests/SubTests/main_priori_tests.m | 4,434 | utf_8 | 2d0a3d9befade7187276f72061bcaa7a | function [ success ] = main_priori_tests( data, DEBUG_LEVEL, fid )
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
if ~exist('DEBUG_LEVEL', 'var')
DEBUG_LEVEL = 2;
end
if ~exist('fid', 'var')
% An fid of 1 will make fprint print to the command window as if no fid
% was give... |
github | CohenBerkeleyLab/BEHR-core-master | read_modis_albedo.m | .m | BEHR-core-master/Read_Data/read_modis_albedo.m | 6,483 | utf_8 | 4a608dc5a89ba07a857c8ae67dcb2687 | function [ band3data ] = read_modis_albedo( modis_directory, date_in, lonlim, latlim, varargin )
%READ_MODIS_ALBEDO Reads MODIS MCD43C1 BRDF albedo
% DATA = READ_MODIS_ALBEDO( MODIS_DIR, COART_LUT, OCEAN_MASK, DATE_IN, DATA ) Reads
% MODIS MCD43C1 data from MODIS_DIR (which must be the path to the root
% MCD43C1 ... |
github | CohenBerkeleyLab/BEHR-core-master | read_omi_sp.m | .m | BEHR-core-master/Read_Data/read_omi_sp.m | 12,302 | utf_8 | 33297ac418993ee7d1f363dadc12aa3c | function [ data, there_are_points ] = read_omi_sp( sp_file, sp_group_path, sp_vars, data, lonlim, latlim, varargin )
%READ_OMI_SP Reads in an OMI Standard Product data file
% DATA = READ_OMI_SP( SP_FILE, SP_VARS, DATA ) Reads in a NASA OMI .he5
% (HDF version 5) file at the path SP_FILE. It will read in the variabl... |
github | CohenBerkeleyLab/BEHR-core-master | avg_modis_alb_to_pixels.m | .m | BEHR-core-master/Read_Data/avg_modis_alb_to_pixels.m | 8,783 | utf_8 | f0ca136a2118013fae266b94c49a4522 | function [ data ] = avg_modis_alb_to_pixels( band3data, coart_lut, ocean_mask, data, varargin )
%AVG_MODIS_ALB_TO_PIXELS Calculate surface reflectivity from MODIS BRDFs
% DATA = AVG_MODIS_ALB_TO_PIXELS( BAND3DATA, COART_LUT, OCEAN_MASK, DATA
% ) Handles calculating surface reflectivity from MODIS BRDF kernels and
%... |
github | CohenBerkeleyLab/BEHR-core-master | read_main.m | .m | BEHR-core-master/Read_Data/read_main.m | 32,685 | utf_8 | c387bd4112bc8b4af12ce3cd31788543 | function read_main(varargin)
% READ_MAIN Reads in OMI, MODIS, and GLOBE data to .mat files
%
% READ_MAIN is the first step in the BEHR workflow. It reads
% in the satellite data from the various sources, include OMI NO2, MODIS
% clouds, MODIS albedo, and GLOBE (a database, not a satellite) terrain
% elevation. ... |
github | CohenBerkeleyLab/BEHR-core-master | convert_globe_surfpres.m | .m | BEHR-core-master/One-off Scripts/convert_globe_surfpres.m | 1,439 | utf_8 | f8091327fba9be7273fa0dcf6969b9cb | function convert_globe_surfpres(input_dir, output_dir)
%CONVERT_GLOBE_SURFPRES Change GLOBETerpres into GLOBETerrainHeight
F = dir(fullfile(input_dir, 'OMI_SP*.mat'));
parfor i_file = 1:numel(F)
if exist(fullfile(output_dir, F(i_file).name), 'file')
fprintf('%s exists already\n', fullfile(output_dir, F(i_... |
github | gmorneault/yield-curve-interpolation-master | nelsonpy.m | .m | yield-curve-interpolation-master/Code/curve_fitting/nelsonpy.m | 436 | utf_8 | 4553d08f80b7e8547c6fcce620c30942 | function py = nelsonpy(maturities,betas,tau)
%% Nelson-Siegel par yield, CEY
% based on Eq.7, 20 and 22 from GSW
py = 2*(1-discount(nelsony(maturities,betas,tau),maturities));
for i=1:length(maturities)
mats = (1:2*maturities(i))/2;
py(i) = py(i) / sum(discount(nelsony(mats,betas,tau),mats));
end
py = py*100;
... |
github | xuhuairuogu/OptimTraj-master | directCollocation.m | .m | OptimTraj-master/directCollocation.m | 17,680 | utf_8 | 99bcafa9cb7f42b2b2d8ab91d91d7e26 | function soln = directCollocation(problem)
% soln = directCollocation(problem)
%
% OptimTraj utility function
%
% This function is designed to be called by either "trapezoid" or
% "hermiteSimpson". It actually calls FMINCON to solve the trajectory
% optimization problem.
%
% Analytic gradients are supported.
%
% NOTE... |
github | xuhuairuogu/OptimTraj-master | chebyshev.m | .m | OptimTraj-master/chebyshev.m | 10,613 | utf_8 | d197906d586572ca06c189288281ded9 | function soln = chebyshev(problem)
% soln = chebyshev(problem)
%
% This function transcribes a trajectory optimization problem Chebyshev
% orthogonal polynomials for basis functions. This is an orthogonal
% collocation method, where the entire trajectory is represented as a
% single polynomial. It is for problems where... |
github | xuhuairuogu/OptimTraj-master | hermiteSimpson.m | .m | OptimTraj-master/hermiteSimpson.m | 11,560 | utf_8 | 690c510dbe95d1ee31b9a2c2fcda28f8 | function soln = hermiteSimpson(problem)
% soln = hermiteSimpson(problem)
%
% This function transcribes a trajectory optimization problem using the
% Hermite-Simpson (Seperated) method for enforcing the dynamics. It can be
% found in chapter four of Bett's book:
%
% John T. Betts, 2001
% Practical Methods for Optima... |
github | xuhuairuogu/OptimTraj-master | trapezoid.m | .m | OptimTraj-master/trapezoid.m | 7,774 | utf_8 | d24e512cdcb2f48f403da6b41b881bcb | function soln = trapezoid(problem)
% soln = trapezoid(problem)
%
% This function transcribes a trajectory optimization problem using the
% trapezoid method for enforcing the dynamics. It can be found in chapter
% four of Bett's book:
%
% John T. Betts, 2001
% Practical Methods for Optimal Control Using Nonlinear Pr... |
github | xuhuairuogu/OptimTraj-master | rungeKutta.m | .m | OptimTraj-master/rungeKutta.m | 39,686 | utf_8 | 23640bdd822c19de616e744a6202c456 | function soln = rungeKutta(problem)
% soln = rungeKutta(problem)
%
% This function transcribes a trajectory optimization problem using the
% multiple shooting, with 4th-order Runge Kutta integration
%
% See Bett's book for details on the method
%
% For details on the input and output, see the help file for optimTraj.m
... |
github | xuhuairuogu/OptimTraj-master | getDefaultOptions.m | .m | OptimTraj-master/getDefaultOptions.m | 8,511 | UNKNOWN | b0e50d99e831c558cf728ae9bb423345 | function problem = getDefaultOptions(problem)
% problem = getDefaultOptions(problem)
%
% This function fills in any blank entries in the problem.options struct.
% It is designed to be called from inside of optimTraj.m, and not by the
% user.
%
%%%% Top-level default options:
OPT.method = 'trapezoid';
OPT.verbose = 2;
... |
github | xuhuairuogu/OptimTraj-master | gpopsWrapper.m | .m | OptimTraj-master/gpopsWrapper.m | 5,777 | utf_8 | fb8e22a03bfa72046ab9bf5458b31b1f | function soln = gpopsWrapper(problem)
% soln = gpopsWrapper(problem)
%
% This function is a wrapper that converts the standard input for optimTraj
% into a call to GPOPS2, a commercially available transcription software
% for matlab. You can purchase and download it at http://www.gpops2.com/
%
% GPOPS2 implements an ad... |
github | xuhuairuogu/OptimTraj-master | inputValidation.m | .m | OptimTraj-master/inputValidation.m | 4,319 | utf_8 | 394cd18a2f88465b4d3adbfe71561f8c | function problem = inputValidation(problem)
%
% This function runs through the problem struct and sets any missing fields
% to the default value. If a mandatory field is missing, then it throws an
% error.
%
% INPUTS:
% problem = a partially completed problem struct
%
% OUTPUTS:
% problem = a complete problem struc... |
github | xuhuairuogu/OptimTraj-master | multiCheb.m | .m | OptimTraj-master/multiCheb.m | 21,236 | utf_8 | f3b52105bdd4fc219954b4149df07295 | function soln = multiCheb(problem)
% soln = multiCheb(problem)
%
% DEPRICATED
%
%
% *************************************************************************
% This file is no longer used, and is preserved for reference only. The
% numerical methods for connecting segments are not the most stable,
% particularily for l... |
github | xuhuairuogu/OptimTraj-master | drawCartPoleAnim.m | .m | OptimTraj-master/demo/cartPole/drawCartPoleAnim.m | 2,133 | utf_8 | 2334402558a3114d7f969148319c70cd | function drawCartPoleAnim(~,p,xLow, xUpp, yLow, yUpp)
% drawCartPoleTraj(t,p,xLow, xUpp, yLow, yUpp)
%
% INPUTS:
% t = [1,n] = time stamp for the data in p1 and p2
% p = [4,n] = [p1;p2];
%
clf; hold on;
Cart_Width = 0.15;
Cart_Height = 0.05;
p1 = p(1:2,:);
p2 = p(3:4,:);
Pole_Width = 4; %pixels
%%%% Figure... |
github | xuhuairuogu/OptimTraj-master | drawCartPoleTraj.m | .m | OptimTraj-master/demo/cartPole/drawCartPoleTraj.m | 2,226 | utf_8 | d998353b28a3858bf2e12e289f80f3a0 | function drawCartPoleTraj(t,p1,p2,nFrame)
% drawCartPoleTraj(t,p1,p2,nFrame)
%
% INPUTS:
% t = [1,n] = time stamp for the data in p1 and p2
% p1 = [2,n] = [x;y] = position of center of the cart
% p2 = [2,n] = [x;y] = position of tip of the pendulum
% nFrame = scalar integer = number of "freeze" frames to displ... |
github | xuhuairuogu/OptimTraj-master | Derive_Equations.m | .m | OptimTraj-master/demo/fiveLinkBiped/Derive_Equations.m | 22,822 | utf_8 | db9aaefe0015ed46a21528cd1f049d49 | function Derive_Equations()
%%%% Derive Equations - Five Link Biped Model %%%%
%
% This function derives the equations of motion, as well as some other useful
% equations (kinematics, contact forces, ...) for the five-link biped
% model.
%
%
% Nomenclature:
%
% - There are five links, which will be numbered starting wi... |
github | xuhuairuogu/OptimTraj-master | dirColGrad.m | .m | OptimTraj-master/demo/fiveLinkBiped/costOfTransport/dirColGrad.m | 11,673 | utf_8 | f7fd60b58db9ceade9467b4c0c3233f9 | function soln = dirColGrad(P, problem)
% soln = dirColGrad(P, problem)
%
% OptimTraj utility function - Direct Collocation with Gradients
%
% This function is core function that is called to run the transcription
% for both the "trapezoid" and the "hermiteSimpson" methods when they are
% running analytic gradients.
%
%... |
github | xuhuairuogu/OptimTraj-master | Derive_Equations.m | .m | OptimTraj-master/demo/fiveLinkBiped/costOfTransport/Derive_Equations.m | 27,136 | utf_8 | 2ee06d2549cae61acad48475153b4214 | function Derive_Equations()
%%%% Derive Equations - Five Link Biped Model %%%%
%
% This function derives the equations of motion, as well as some other useful
% equations (kinematics, contact forces, ...) for the five-link biped
% model.
%
% This version of the code includes a few more complicated features for
% dealin... |
github | oklachumi/octave-in-communications-master | PAPR_of_Chu.m | .m | octave-in-communications-master/PAPR_of_Chu.m | 1,199 | utf_8 | d82b0d1ed0a6f586e6c3a6bd1ca432c2 | % PAPR_of_Chu.m
clear,close,clc all
function [xt, time] = IFFT_oversampling(X,N,L)
if nargin < 3
L = 1;
end
NL = N*L;
T = 1/NL;
time = [0:T:1-T];
X = X(:).';
xt = L*ifft([X(1:N/2) zeros(1,NL-N) X(N/2+1:end)], NL);
endfunction
function [PAPR_dB, AvgP_dB, PeakP_dB] = PAPR(x)
% PAPR_dB : PAPR[dB]
% AvgP_dB : Average... |
github | oklachumi/octave-in-communications-master | plot_OFDM_CCDF.m | .m | octave-in-communications-master/plot_OFDM_CCDF.m | 1,786 | utf_8 | 86c687d2b4ba44f0f1216e615b5357cc | clear,close,clc all
% CCDF of OFDM Signal
%function [mod_object] = mapper(b,N)
%% If N is given, it generates a block of N random 2^b-PSK/QAM modulated symbols.
%% Otherwise, it generates a block of 2^b-PSK/QAM modulated symbols for [0:2^b-1].
%
%M=2^b; % Modulation order or Alphabet (Symbol) size
%if b==1
% Mod='BPS... |
github | oklachumi/octave-in-communications-master | QPSK_in_AWGN_Rayleigh_fading_channel.m | .m | octave-in-communications-master/QPSK_in_AWGN_Rayleigh_fading_channel.m | 3,426 | utf_8 | 5cffd1d2f9d462307ba27e5ae80a8a73 | clear,clc,close all
function [h]=rayleigh(fd,t)
%該程式利用改進的jakes模型來產生單徑的平坦型Rayleigh衰落信道
%IEEE Commu letters, Vol.6, NO.6, JUNE 2002
%輸入變數說明:
% fd:信道的最大多普勒頻移 單位Hz
% t:信號的抽樣時間序列 抽樣間隔單位s
% h:為輸出的Rayleigh信道函數 一個時間函數複序列
%假設的入射波數目
N=40;
wm=2*pi*fd;
%每象限的入射波數目即振盪器數目
N0=N/4;
%信道函數的實部
Tc=zeros(1,lengt... |
github | oklachumi/octave-in-communications-master | plot_PL_IEEE80216d.m | .m | octave-in-communications-master/plot_PL_IEEE80216d.m | 2,880 | utf_8 | b3f064f66d4c27f0305c2ec30034956b | clear,close,clc all
function PL = PL_IEEE80216d(fc,d,type,htx,hrx,corr_fact,mod)
% IEEE 802.16d model
% Input - fc : carrier frequency
% d : between base and terminal
% type : selects 'A', 'B', or 'C'
% htx : height of transmitter
% hrx : height of receiver
% ... |
github | oklachumi/octave-in-communications-master | PDF_of_clipped_and_filtered_OFDM_signal.m | .m | octave-in-communications-master/PDF_of_clipped_and_filtered_OFDM_signal.m | 4,563 | utf_8 | 2713e233c01416a58e4126ccb305b50f | % PDF_of_clipped_and_filtered_OFDM_signal.m
% QPSK/OFDM system for analyzing the performance of clipping and filtering technique
clear,close,clc all
function [x_clipped,sigma] = clipping(x,CL,sigma)
% CL : Clipping Level
% sigma: sqrt(variance of x)
if nargin < 3
x_mean = mean(x);
x_dev = x-x_mean;
sigma = sqr... |
github | oklachumi/octave-in-communications-master | PAPR_of_preamble.m | .m | octave-in-communications-master/PAPR_of_preamble.m | 1,102 | utf_8 | b1c544e31056421e9b09e4d44a0260b0 | % PAPR_of_preamble.m
clear,close,clc all
function [xt, time] = IFFT_oversampling(X,N,L)
if nargin < 3
L = 1;
end
NL = N*L;
T = 1/NL;
time = [0:T:1-T];
X = X(:).';
xt = L*ifft([X(1:N/2) zeros(1,NL-N) X(N/2+1:end)], NL);
endfunction
function [PAPR_dB, AvgP_dB, PeakP_dB] = PAPR(x)
% PAPR_dB : PAPR[dB]
% AvgP_dB : Av... |
github | oklachumi/octave-in-communications-master | QPSK_in_AWGN_channel.m | .m | octave-in-communications-master/QPSK_in_AWGN_channel.m | 1,735 | utf_8 | 2e3246c3bbb4f7c8adaee7b40d1c1141 | clear,close,clc all
function [DATA]=intdump(IN,num)
outidx=1;
for z=1:num:length(IN)
DATA(outidx)=sum(IN(z:z+num-1))/num;
outidx=outidx+1;
end
% return DATA
end
M=4; %QPSK的符號類型
nsamp=8;
numsymb=1e5; %每種SNR下的傳輸的符號數
SN... |
github | oklachumi/octave-in-communications-master | Jakes_model_rayleigh_channel.m | .m | octave-in-communications-master/Jakes_model_rayleigh_channel.m | 1,591 | utf_8 | 67afe767aa7538cb873dbda73173b49b | clear,clc,close all
function [h]=rayleigh(fd,t)
%該程式利用改進的jakes模型來產生單徑的平坦型瑞利衰落信道
%IEEE Commu letters, Vol.6, NO.6, JUNE 2002
%輸入變數說明:
% fd:信道的最大多普勒頻移 單位Hz
% t:信號的抽樣時間序列 抽樣間隔單位s
% h:為輸出的瑞利信道函數 一個時間函數複序列
%假設的入射波數目
N=40;
wm=2*pi*fd;
%每象限的入射波數目即振盪器數目
N0=N/4;
%信道函數的實部
Tc=zeros(1,le... |
github | oklachumi/octave-in-communications-master | plot_PL_Hata.m | .m | octave-in-communications-master/plot_PL_Hata.m | 1,374 | utf_8 | e41a473a50cc5d7735c9a7d9df6a8b20 | clear,close,clc all
function PL = PL_Hata(fc,d,htx,hrx,Etype)
% Hata Model
% Input
% fc : carrier frequency [Hz]
% d : between base station and mobile station [m]
% htx : height of transmitter [m]
% hrx : height of receiver [m]
% Etype : Environment Type('urban','suburban','ope... |
github | oklachumi/octave-in-communications-master | single_carrier_PAPR.m | .m | octave-in-communications-master/single_carrier_PAPR.m | 2,222 | utf_8 | 02eebda1febb897b92ff1d81a373970b | clear,close,clc all
function [s,time] = modulation(x,Ts,Nos,Fc)
% modulation(X,1,32,1)
% Ts : Sampling period
% Nos: Oversampling factor
% Fc : Carrier frequency
Nx = length(x); % 4
offset = 0;
if nargin < 5
scale = 1;
T = Ts/Nos; % Scale and Oversampling period for Baseband
else
scale = sqrt(2);
T=1/Fc/2/No... |
github | oklachumi/octave-in-communications-master | channel_estimation.m | .m | octave-in-communications-master/channel_estimation.m | 7,685 | utf_8 | 9874b818bb7db1192271c19ca57690ae | %channel_estimation.m
% for LS/DFT Channel Estimation with linear/spline interpolation
clear,close,clc all;
function H_LS = LS_CE(Y,Xp,pilot_loc,Nfft,Nps,int_opt)
% LS channel estimation function
% Inputs:
% Y = Frequency-domain received signal
% Xp = Pilot signal
% pilot_loc = Pilot l... |
github | oklachumi/octave-in-communications-master | plot_Ray_Ric_channel.m | .m | octave-in-communications-master/plot_Ray_Ric_channel.m | 1,079 | utf_8 | 2d6a6159a58356dbb1271f082e0894c4 | % plot_Ray_Ric_channel.m
clear,close,clc all
function H = Ray_model(L)
% Rayleigh Channel Model
% Input : L : # of channel realization
% Output: H : Channel vector
H = (randn(1,L)+j*randn(1,L))/sqrt(2);
endfunction
function H=Ric_model(K_dB,L)
% Rician Channel Model
% Input:
% K_dB : K factor [dB]
% ... |
github | mortezamg63/Edge-Detection-Back-Propagation-ANN-master | Edge_Detection_BP_ANN.m | .m | Edge-Detection-Back-Propagation-ANN-master/Edge_Detection_BP_ANN.m | 3,190 | utf_8 | 6c8f0d26c3cc8c98cac0a119e727a81e | function [re,V,W,V0,W0]=Edge_Detection_BP_ANN(addressImage)
Pattern=16;
Epoch=500;
Nx=4;
Pz=12;
My=4;
Alfa=0.15;
s=[1 1 1 1;1 1 1 0;1 1 0 1;1 1 0 0;1 0 1 1;1 0 1 0;1 0 0 1;1 0 0 0;0 1 1 1;0 1 1 0;0 1 0 1;0 1 0 0;0 0 1 1;0 0 1 0;0 0 0 1;0 0 0 0];
t=[1 1 1 1;1 1 1 1;1 1 1 1;1 1 0 0;1 1 1 1;1 0 1 0;1 0 0 1;1 0 0 1... |
github | rjanalik/HPC_2017-master | writeMeshToVTKFile.m | .m | HPC_2017-master/Assignment7/meshpart/writeMeshToVTKFile.m | 2,183 | utf_8 | f31e74ce79aa9d048e601b3e892f79fa |
function writeMeshToVTKFile(prefix, ElementList, PointList, ElementParams, PointParams, type)
numberOfPoints = size(PointList, 1);
numberOfElements = size(ElementList, 1);
numberOfVertices = size(ElementList, 2);
% 2. read the .node file
% %%%%%%%%%%%%%%%%%%%%%%
% this opens a file in text 't mode for r... |
github | rspurney/TuxNet-master | RTPSTAR_MAIN.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/RTPSTAR_MAIN.m | 9,737 | utf_8 | c7454da4c48a4b501e3d60bd9e55d43c | %Run RTP-STAR a certain number of times. Each time, we
%save the final network that is created. At the end, we count the number of
%times each of the edges appears in a network and only keep edges over a
%certain proportion.
%
%GENIE3 code reference: Huynh-Thu V. A., Irrthum A., Wehenkel L., and Geurts P.
%Inferr... |
github | rspurney/TuxNet-master | regression_tree_pipeline.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/regression_tree_pipeline.m | 8,001 | utf_8 | b91841cf59814ad47c4117bd37a184b4 | %NOTE: This requires the Statistics and Machine Learning and Bioinformatics
%toolboxes.
%This file runs the regression tree pipeline for GRN inference. Genes are
%first clustered (if applicable) and then networks for each cluster are
%inferred. If there are multiple clusters, clusters are connected using the
%sa... |
github | rspurney/TuxNet-master | run_regressiontree.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/run_regressiontree.m | 11,435 | utf_8 | 2934174b0588911e0be852269964fc1a | %Construct GRN using regression tree algorithm on an excel file
%Infers directionality using time course data
%
%Parameters:
%expression_data: MATLAB table that contains the expression data
%
%clusterfile: file that contains the genes and which cluster they are in
%
%symbol: MATLAB table that contains known sym... |
github | rspurney/TuxNet-master | biograph_to_text.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/biograph_to_text.m | 2,422 | utf_8 | f5d5af76d7c9b9a4629338931504b7dd | %Write biograph results to .txt file for cytoscape
%
%Parameters:
%bg2 is a biograph produced by regression tree algorithm
%
%istimecourse:boolean variable (true/false) that indicates if a timecourse
%was used for directionality. Default is true.
%
%filename is the name of the file where you want to write resu... |
github | rspurney/TuxNet-master | clustering.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/clustering.m | 4,325 | utf_8 | d772e98fea22725afa8377c495b3bd16 | %Determine appropriate number of clusters for gene expression data
%Saves the clusters to a file
%
%Parameters:
%clustering_data: MATLAB table that contains
%clustering data, see below comments for proper formatting.
%
%clustering_type: variable denoting if you are using spatial or temporal
%clustering. Use "S... |
github | rspurney/TuxNet-master | init_mart.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/GENIE3_MATLAB/RT/init_mart.m | 455 | utf_8 | 72ba513ec83e0baceb8d3368a14313a5 |
function rtensparam=init_mart(compl,mu)
rtensparam.nbterms=500;
rtensparam.mart=1;
if nargin>1
rtensparam.martmu=mu;
else
rtensparam.martmu=0.2;
end
rtensparam.bootstrap=0;
rtparam.nmin=1;
rtparam.varmin=0;
rtparam.savepred=1;
rtparam.bestfirst=1;
if nargin>0
rtparam.max... |
github | rspurney/TuxNet-master | cvpredict.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/GENIE3_MATLAB/RT/cvpredict.m | 1,271 | utf_8 | f74f77189c401edfc7728a3ead4408d4 |
function [YPRED]=cvpredict(X,Y,cvparam,bl_learn,bl_param,verbose)
% Test by cross-validation
% parametres:
% bl_learn: the learning function (e.g. 'rtenslearn_c')
% bl_param: the parameters (for example the output of init_extra_trees())
% cvparam: cross-validation parameters
% cvparam.nbfolds: number of fol... |
github | rspurney/TuxNet-master | rtenspred.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/GENIE3_MATLAB/RT/rtenspred.m | 1,795 | utf_8 | a259e929ae10723171d5a1fa6b8e9254 |
function [YTS]=rtenspred(treeensemble,XTSA)
% Make predictions with an ensemble of (multiple output) regression trees
% inputs:
% tree: a tree output by the function rtenslearn_c
% XTS: inputs for the test cases
% YLS: outputs for the learning sample cases
% Output:
% YTS: Predictions for the test cases
... |
github | rspurney/TuxNet-master | init_bagging.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/GENIE3_MATLAB/RT/init_bagging.m | 250 | utf_8 | 790cc604d5e748f4643ac219ac2fbb68 |
function rtensparam=init_bagging()
rtensparam.nbterms=100;
rtensparam.bootstrap=1;
rtparam.nmin=1;
rtparam.varmin=0;
rtparam.savepred=1;
rtparam.bestfirst=0;
rtparam.extratrees=0;
rtparam.savepred=1;
rtensparam.rtparam=rtparam; |
github | rspurney/TuxNet-master | init_rf.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/GENIE3_MATLAB/RT/init_rf.m | 376 | utf_8 | ecff6eddea689a6452d990fc34d9fdfd |
function rtensparam=init_rf(k)
rtensparam.nbterms=100;
rtensparam.bootstrap=1;
rtparam.nmin=2;
rtparam.varmin=0;
rtparam.savepred=1;
rtparam.bestfirst=0;
rtparam.rf=1;
rtparam.extratrees=0;
if nargin>0
rtparam.adjustdefaultk=0;
rtparam.extratreesk=k;
else
rtparam.adjustdefaultk=1;
... |
github | rspurney/TuxNet-master | init_extra_trees.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/GENIE3_MATLAB/RT/init_extra_trees.m | 369 | utf_8 | 03de82598e002348504fb03b50b0e52b |
function rtensparam=init_extra_trees(k)
rtensparam.nbterms=100;
rtensparam.bootstrap=0;
rtparam.nmin=1;
rtparam.varmin=0;
rtparam.savepred=1;
rtparam.bestfirst=0;
rtparam.extratrees=1;
if nargin>0
rtparam.adjustdefaultk=0;
rtparam.extratreesk=k;
else
rtparam.adjustdefaultk=1;
end
... |
github | rspurney/TuxNet-master | compute_rtens_variable_importance.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/GENIE3_MATLAB/RT/compute_rtens_variable_importance.m | 2,760 | utf_8 | b9bdf4e86da94f196544fdf6626b784f |
function [VI]=compute_rtens_variable_importance(treeensemble,XTS,YTS)
% Compute variable importances from an ensemble of (multiple output)
% regression trees.
% inputs:
% treeensemble: a tree output by the function rtenslearn_c
% XTS: the input data on which to estimate the importances
% YTS: the output data... |
github | rspurney/TuxNet-master | init_single_rt.m | .m | TuxNet-master/TuxNet-MATLAB/RTP-STAR/GENIE3_MATLAB/RT/init_single_rt.m | 228 | utf_8 | 90d7705e4633ed17fe3b8ec55eb02ffc |
function rtensparam=init_single_rt()
rtensparam.nbterms=1;
rtensparam.bootstrap=0;
rtparam.nmin=1;
rtparam.varmin=0;
rtparam.savepred=1;
rtparam.bestfirst=0;
rtparam.extratrees=0;
rtensparam.rtparam=rtparam; |
github | plantsgo/Metrics-master | quadraticWeightedKappa.m | .m | Metrics-master/MATLAB/metrics/quadraticWeightedKappa.m | 1,841 | utf_8 | 1f008d25efe57b152118d3985102f6ac | function score = quadraticWeightedKappa(actual, predicted, minRating, maxRating)
%QUADRATICWEIGHTEDKAPPA Calculates the quadratic weighted kappa
% scoreQuadraticWeightedKappa calculates the quadratic weighted kappa
% value, which is a measure of inter-rater agreement between two raters
% that provide discr... |
github | plantsgo/Metrics-master | auc.m | .m | Metrics-master/MATLAB/metrics/auc.m | 1,139 | utf_8 | 4d20c857e7b3755f9d0c3cbfd41f2f87 | function auc = auc(category,posterior)
% auc = scoreAUC(category,posterior)
%
% Calculates the area under the ROC for a given set
% of posterior predictions and labels. Currently limited to two classes.
%
% posterior: n*1 matrix of posterior probabilities for class 1
% category: n*1 matrix of categories {0,1}
% auc: A... |
github | plantsgo/Metrics-master | testRMSLE.m | .m | Metrics-master/MATLAB/metrics/test/testRMSLE.m | 439 | utf_8 | e0b4e675710831cc277e5702221b1396 | function testRMSLE()
%TESTRMSLE Test cases for mean squared log error
%
% Author: Ben Hamner (ben@benhamner.com)
fprintf('Testing RMSLE ...');
test_case(exp(2)-1,exp(1)-1,1);
test_case([0 .5 1 1.5 2],[0 .5 1 1.5 2], 0);
test_case([1 2;3 exp(1)-1], [1 2;3 exp(2)-1], 0.5);
fprintf('tests passed\n');
function tes... |
github | plantsgo/Metrics-master | testMSLE.m | .m | Metrics-master/MATLAB/metrics/test/testMSLE.m | 436 | utf_8 | 02b54a49a8de0b8602a20259c5235838 | function testMSLE()
%TESTMSLE Test cases for mean squared log error
%
% Author: Ben Hamner (ben@benhamner.com)
fprintf('Testing MSLE ...');
test_case(exp(2)-1,exp(1)-1,1);
test_case([0 .5 1 1.5 2],[0 .5 1 1.5 2], 0);
test_case([1 2;3 exp(1)-1], [1 2;3 exp(2)-1], 0.25);
fprintf('tests passed\n');
function test_... |
github | plantsgo/Metrics-master | testGini.m | .m | Metrics-master/MATLAB/metrics/test/testGini.m | 735 | utf_8 | 1cc0a13705cddc1e7944b4300c978afb | function testGini()
%TESTGINI Test cases for Gini
%
% Author: Ben Hamner (ben@benhamner.com)
fprintf('Testing gini ...');
test_case(1:3, [10 20 30], 1/9);
test_case(1:3, [30 20 10], -1/9);
test_case([2,1,4,3], [0,0,2,1], 0.125);
test_case([0,20,40,0,10], [40,40,10,5,5], 0);
test_case([40,0,20,0,10], [1000000 40 ... |
github | plantsgo/Metrics-master | testNormalizedGini.m | .m | Metrics-master/MATLAB/metrics/test/testNormalizedGini.m | 747 | utf_8 | 15cb844c475bdb87cf1ebfd97c4c5748 | function testNormalizedGini()
%TESTNORMALIZEDGINI Test cases for Normalized Gini
%
% Author: Ben Hamner (ben@benhamner.com)
fprintf('Testing gini ...');
test_case(1:3, [10 20 30], 1);
test_case(1:3, [30 20 10], -1);
test_case([2,1,4,3], [0,0,2,1], 1);
test_case([0,20,40,0,10], [40,40,10,5,5], 0);
test_case([40,0... |
github | plantsgo/Metrics-master | testAveragePrecisionAtK.m | .m | Metrics-master/MATLAB/metrics/test/testAveragePrecisionAtK.m | 686 | utf_8 | e58b7d28b8ce1d44d7904468ec0b3008 | function testAveragePrecisionAtK()
%TESTAVERAGEPRECISIONATK Test cases for AP@K
%
% Author: Ben Hamner (ben@benhamner.com)
fprintf('Testing averagePrecisionAtK ...');
actual = 1:5;
prediction = 1:10;
score = averagePrecisionAtK(actual, prediction);
assert(abs(1-score) < eps);
test_case(1:5, [6 4 7 1 2], 2, 0.25)... |
github | plantsgo/Metrics-master | testMeanAveragePrecisionAtK.m | .m | Metrics-master/MATLAB/metrics/test/testMeanAveragePrecisionAtK.m | 742 | utf_8 | e5166acb03fe3dbe8e0b561cd9a98bbe | function testMeanAveragePrecisionAtK()
%TESTMEANAVERAGEPRECISIONATK Test cases for MAP@K
%
% Author: Ben Hamner (ben@benhamner.com)
fprintf('Testing meanAveragePrecisionAtK ...');
actual = {(1:5) [1 2 3]};
prediction = {(1:10) [1 2 4:11 3]};
score = meanAveragePrecisionAtK(actual, prediction);
assert(abs(5/6-scor... |
github | plantsgo/Metrics-master | testLogLoss.m | .m | Metrics-master/MATLAB/metrics/test/testLogLoss.m | 479 | utf_8 | 9dac22b7fa7cb76b1bc75193533f31d5 | function testLogLoss()
%TESTLOGLOSS Test cases for logLoss
%
% Author: Ben Hamner (ben@benhamner.com)
fprintf('Testing logLoss ...');
test_case([1 1 1 0 0 0], [.5 .1 .01 .9 .75 .001], 1.881797068998267);
test_case([1 1 1 0 0 0], [1 1 1 0 0 0], 0);
score = logLoss([1 1 0 0], [1 0 0 0]);
assert(score == Inf);
fpr... |
github | plantsgo/Metrics-master | testClassificationError.m | .m | Metrics-master/MATLAB/metrics/test/testClassificationError.m | 610 | utf_8 | 56bb56a872843828c64ef8bdf58e2395 | function testClassificationError()
%TESTCLASSIFICATIONERROR Test cases for classificationError
%
% Author: Ben Hamner (ben@benhamner.com)
fprintf('Testing classificationError ...');
test_case([1 1 1 0 0 0], [1 1 1 0 0 0], 0);
test_case([1 1 1 0 0 0], [1 1 1 1 0 0], 1/6);
test_case([1 2;3 4], [1 2;3 3], 1/4);
test... |
github | marthawhite/reverse-prediction-master | RegressionSemi.m | .m | reverse-prediction-master/algs/RegressionSemi.m | 6,321 | utf_8 | 8807200d21eadf0e71d1da2414a2ce78 | function [Z, W, U, flag] = RegressionSemi(Xl, Yl, Xu, opts)
% REGRESSION_SEMI solves the alternating reverse prediction problem
% approach for the general unconstrained semisupervised setting:
%
% min_{Z,U} loss_fcn(Xl, Yl*U)/tl + mu*loss_fcn(Xu,ZU)/tu + beta*tr(UU^T)
%
%
%% Inputs:
% Xl: labeled input data
% Yl: l... |
github | marthawhite/reverse-prediction-master | recoverForwardModelSemi.m | .m | reverse-prediction-master/algs/recoverForwardModelSemi.m | 1,273 | utf_8 | 24ad08a30c0191cb7268c0a5191a4ad4 | function [W,U,Y,Xhat] = recoverForwardModelSemi(X,f,f_inv,CA,Lfor,tl,kernel)
% CA is the clustering algorithm
% Lfor is the loss function
% if kernel provided, then learn forward model on kernel
t = size(X,1);
n = size(X,2);
% Step 1: Compute Y and M
[Y,M] = CA();
k = size(Y,2);
%Y = roundY(Y);
%[match, P] = align(Yt... |
github | marthawhite/reverse-prediction-master | Regression.m | .m | reverse-prediction-master/algs/Regression.m | 3,928 | utf_8 | 1136384940bc98326fdc31f7ee28390e | function [Z, W, U, flag] = Regression(Xl, Yl, Xu, opts)
% REGRESSION solves the labelled reverse prediction problem
% approach for constrained supervised prediction
%
% min_{U} loss_fcn(Xl, Yl*U)/tl + beta*tr(UU^T)
% Z = f(Xu*W)
%
% Note: Currently does not return a reverse model, U, returns U = [].
%
%% Inputs:
% Xl... |
github | marthawhite/reverse-prediction-master | trg.m | .m | reverse-prediction-master/algs/competitors/trg.m | 2,691 | utf_8 | 42939ede8840f01326383d5522f0b27d | function [Z,flag] = trg(Xl, Yl, Xu, opts)
% TRG implements Cortes' transductive regression algorithm
% phi is the feature vector on training examples X_m and for
% the testing examples (unlabeled) Xu
% [Optional] If K is not provided or K==0, does primal solution
% Note that a model W is produced, but it is only applic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.