This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| rvkde:usage [2008/08/19 01:52] – dirty | rvkde:usage [2008/08/19 04:21] (current) – dirty | ||
|---|---|---|---|
| Line 36: | Line 36: | ||
| * Change the current path to __~/ | * Change the current path to __~/ | ||
| * Cross-validation on __satimage.scale__.< | * Cross-validation on __satimage.scale__.< | ||
| - | rvkde-0.2.3-final/ | + | rvkde-0.2.3-final/ |
| </ | </ | ||
| Let's take a look at the command. | Let's take a look at the command. | ||
| - | ^ --cv | Switch rvkde into cross-validation mode. | | + | ^ --cv | Switch rvkde into cross-validation mode. | |
| - | ^ --classify | Tell rvkde we want to do classification rather than regression now. | | + | ^ --classify | Tell rvkde we want to do classification rather than regression now. | |
| - | ^ --acc | Use [[wp>Accuracy|Accuracy]] as the evaluation index. | | + | ^ --acc | Use [[wp>accuracy|accuracy]] as the evaluation index. | |
| - | ^ -n | Do //n//-fold cross-validation. | | + | ^ -n | Do __n__-fold cross-validation. | |
| - | ^ -v | Followed by the dataset for cross-validation. | | + | ^ -v | Followed by the dataset for cross-validation. | |
| + | ^ -a | Set the range (begin, end and step) of __alpha__ values of RVKDE. | ||
| + | ^ -b | Set the range (begin, end and step) of __beta__ values of RVKDE. | ||
| + | ^ --ks | Set the range (begin, end and step) of __ks__ values of RVKDE. | ||
| + | ^ --kt | Set the range (begin, end and step) of __kt__ values of RVKDE. | ||
| * The result looks like< | * The result looks like< | ||
| - | [0.914994] a=1 b=1 s=8 t=10... | + | [0.918602] a=1 b=1 s=8 t=21... |
| - | </ | + | </ |
| - | ===== Predict with the selected | + | ===== Predict with the selected |
| Now we have a parameter combination derived from cross-validation. | Now we have a parameter combination derived from cross-validation. | ||
| - | * Use this model to predict | + | * Use these parameters |
| - | rvkde/rvkde --predict --classify --f-measure | + | rvkde-0.2.3-final/rvkde --predict --classify --acc -v rvkde-0.2.3-final/satimage.scale -V rvkde-0.2.3-final/satimage.scale.t -a 1 -b 1 --ks 8 --kt 21 |
| </ | </ | ||
| Let's take a look at the command. | Let's take a look at the command. | ||
| - | ^ --predict | Switch | + | ^ --predict | Switch |
| ^ -v | Followed by the training dataset. | | ^ -v | Followed by the training dataset. | | ||
| ^ -V | Followed by the testing dataset. | | ^ -V | Followed by the testing dataset. | | ||
| * The result looks like< | * The result looks like< | ||
| - | [0.333333] a=1 b=1 s=9 t=10... | + | [0.9175] a=1 b=1 s=8 t=21... |
| - | </ | + | </ |
| - | + | ||
| - | ===== How good cross-validation is ===== | + | |
| - | We can enumerate many parameter combinations (as in cross-validation mode) to see the prediction performance. | + | |
| - | * Predict with a range of parameter | + | |
| - | rvkde/rvkde --predict | + | |
| - | </ | + | |
| - | * The result looks like< | + | |
| - | [0.428986] a=1 b=1 s=10 t=30... | + | |
| - | </ | + | |
| ====== Train, validate, and then test ====== | ====== Train, validate, and then test ====== | ||
| - | Another common procedure for model selection is to create an independent validation set. For example, you can use //tr.x5// and //va.x5// to do model selection and see how good the model is when applying on //te.x5//. | + | Another common procedure for parameter |
| - | * Use //tr.x5// (as training set) and //va.x5// (as validation set) to select the model.< | + | * Use __satimage.scale.tr__ |
| - | rvkde/rvkde --predict --classify --f-measure | + | rvkde-0.2.3-final/rvkde --predict --classify --acc -v rvkde-0.2.3-final/satimage.scale.tr -V rvkde-0.2.3-final/satimage.scale.val |
| </ | </ | ||
| * The result looks like< | * The result looks like< | ||
| - | [0.381232] a=1 b=1.5 s=17 t=10... | + | [0.913599] a=1 b=1 s=8 t=23... |
| </ | </ | ||
| - | * Predict | + | * Predict |
| - | rvkde/rvkde --predict --classify --f-measure | + | rvkde-0.2.3-final/rvkde --predict --classify --acc -v rvkde-0.2.3-final/satimage.scale.tr |
| </ | </ | ||
| * The result looks like< | * The result looks like< | ||
| - | [0.365651] a=1 b=1.5 s=17 t=10... | + | [0.917] a=1 b=1 s=8 t=23... |
| - | </ | + | </ |
| - | + | ||
| - | ====== Summary of RVKDE ====== | + | |
| - | Until now, you know that RVKDE has four parameters (//alpha//, //beta//, //ks//, and // | + | |
| - | + | ||
| - | In addition, you learn two common model selection | + | |