Newly Blog


  • Home

  • Tags

  • Categories

  • Archives

  • Search

Boost_lexical_cast

Posted on 2022-06-16 | In programming language , C++
1
2
#include < boost/lexical_cast.hpp>
using namespace boost;
  1. conversion between number and string: replace the atoi, itoa, and etc

    1
    2
    cout<< lexical_cast< string>(i)<< endl;
    cout<< lexical_cast< double>(s)<< endl;
  2. mixed types: for type generalization

    1
    2
    3
    #include < boost/fusion/adapted/boost_tuple.hpp>
    boost::tuple<char, int, char, int> decim('-', 10, 'e', 5);
    assert(stringize(decim) == "-10e5");

Boost_installation

Posted on 2022-06-16 | In programming language , C++

Problem: When installing boost, “cl not found”. Or unresolved reference.

Solution: cd Microsoft Visual Studio 11.0\VC, run vcvarsall.bat amd64. add Microsoft Visual Studio 11.0\VC\bin into environmental Path. Refer to http://www.boost.org/doc/libs/1_59_0/more/getting_started/windows.html for installation details.

Note that 32 bit and 64 bit should be treated differently when using b2.exe. For 32 bit, run b2 toolset=msvc-11.0 --build-type=complete --libdir=C:\Boost\lib\i386 stage. For 64 bit, run b2 toolset=msvc-11.0 --build-type=complete --libdir=C:\Boost\lib\x64 architecture=x86 address-model=64 stage.

To put it simple, download binary files from http://sourceforge.net/projects/boost/files/boost-binaries/. Boost is auto-link which means you don’t need to add all lib files manually.


If you have installed boost, using it in a VC project just takes two steps:

  1. C/C++->General: Additional Include Directories D:\Program_Files\boost_1_59_0_binary\boost;

  2. Linker->General: Additional Library Directories D:\Program_Files\boost_1_59_0_binary\lib64-msvc-11.0;

  3. Add D:\Program_Files\boost_1_59_0_binary\lib64-msvc-11.0 in the environmental variable Path.

Notes:

  1. x64 and x86 conflicts: Linker->advanced->target machine
  2. build->configuration manager

Boost_file_system

Posted on 2022-06-16 | In programming language , C++
1
2
#include < boost/filesystem.hpp>  
using namespace boost::filesystem;
  1. file name operation

    1
    2
    3
    4
    5
    6
    7
    8
    9
    //Note the difference between /= and +=, /= means appending directory, += means string concatenation 
    path dir("C:\\Windows");
    dir /= "System32";
    dir /= "services.exe";
    std::cout << dir.string() << std::endl;
    std::cout << dir.parent_path()<< std::endl; /C:\Windows\System32
    std::cout << dir.filename()<< std::endl; /services.exe
    std::cout << dir.stem()<< std::endl; //services
    std::cout << dir.extension()<< std::endl; //.exe
  2. file operation: rename, remove, copy

    1
    2
    3
    4
    5
    6
    7
    8
    9
    exists(path);                               
    is_directory(path);
    is_regular_file(path);

    remove_all(const Path& p); //remove all files recursively
    rename(const Path1& from_p, const Path2& to_p);
    copy_file(const Path1& from_fp, const Path2& to_fp);
    create_directory(const Path & p);
    create_directories(const Path & p); //make directory recursively</pre>
  3. shallow visit directory

    1
    2
    3
    4
    5
    6
    path dir2("c:\\Windows\\System32");
    directory_iterator end;
    for (directory_iterator pos(dir2); pos != end; pos++)
    {
    std::cout << *pos << std::endl;
    }
  4. deep visit directory: like DFS, stack push&&pop

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    typedef recursive_directory_iterator rd_iterator;
    path dir2("E:\\Student");
    rd_iterator end;
    for (rd_iterator pos(dir); pos != end; pos++)
    {
    if (is_directory(*pos) && pos.level() > 4)
    {
    pos.no_push();
    }
    if (*pos == "nofind.txt")
    {
    pos.pop();
    }
    else
    {
    cout<< pos->path().filename().string()<< endl;
    }
    }
  5. catch error

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    try
    {
    path dir2("c:\\Windows\\System32");
    assert(is_directory(dir2));
    assert(exists(dir2));
    }
    catch(filesystem_error& e)
    {
    std::cout << e.path1() << std::endl;
    std::cout << e.what() << std::endl;
    }

Boost_array

Posted on 2022-06-16 | In programming language , C++
1
2
#include "boost/array.hpp"
#include "boost/multi_array.hpp"
  1. Array: similar with STL vector

    1
    array< std::string, 3> a</pre>
  2. Multi-Array: refer to this for more details, similar with matlab matrix operation

    1
    2
    typedef boost::multi_array<double, 3> array_type;
    array_type A(boost::extents[3][4][2]);

Android

Posted on 2022-06-16 | In programming language , Android

Installation:

  1. Download and install SDK

  2. Install via SDK manager and AVD manager

  3. Add C:\Program Files (x86)\Android\android-sdk\tools to environment path

  4. Install ADT plugin in Eclipse by entering “ADT Plugin” for the Name and the following URL for the Location: https://dl-ssl.google.com/android/eclipse/

  5. The first time to lauch AVD may take rather long time, just be patient. Leave the launched AVD open until your project is finished.

Possible problems during installation:

  1. java basis is unresolved: Project->Properties->Java Build Path->Libraries, add JRE lib

  2. Android is unresolved: Project->Properties->Android, choose project build target and apply. For some Eclipse versions, clean and rebuild.

Resource:

  1. Android API

  2. http://zetcode.com/mob/android/

  3. https://www.embeddedlinux.org.cn/AndroidEssentials/

  4. Begining Android2: code is downloaded from https://www.apress.com

Application:

Application consists of Activity, Service, BroadcastReceiver, and Content Provider, in which Activity is a regular App, Service can run independently in the background, such as MP3 player, BroadcastReceiver reacts to outcoming events, Content Provider save data via SQLite or share data with other applications.

  1. activity: Most common application. [AndroidManifest example] [activity cycle]

  2. service: Similar with activity but without user interface. [AndroidManifest example] [service cycle]

    • independent service

      1
      2
      3
      4
      final Intent intent = new Intent();
      intent.setAction("org.crazyit.service.FIRST_SERVICE");
      startService(intent);
      stopService(intent);
    • service has connection with activity via IBinder

      1
      2
      3
      4
      5
      6
      7
      8
      9
      BindService.MyBinder binder;
      private ServiceConnection conn = new ServiceConnection(){
      public void onServiceConnected(ComponentName name, IBinder service){
      binder = (BindService.MyBinder) service;
      }
      public void onServiceDisconnected(ComponentName name){}
      };
      bindService(intent, conn, Service.BIND_AUTO_CREATE);
      unbindService(conn);
    • to create a new thread, extend class IntentService

    • for interprocess communication, use AIDL, i.e., extends Stub as IBinder interface. The others are the same as Service.

  3. receiver: a global listener. AndroidManifest example

    1
    2
    3
    4
    Intent intent = new Intent();
    intent.setAction("org.crazyit.action.CRAZY_BROADCAST");
    intent.putExtra("msg", "hello world");
    sendBroadcast(intent);

    use IntentFilter to filter the received broadcast

    1
    2
    3
    IntentFilter filter = new IntentFilter();
    filter.addAction(MusicBox.CTL_ACTION);
    registerReceiver(serviceReceiver, filter);
  4. provider: globally share data. AndroidManifest example

    The joint point is Uri: content://org.crazyit.providers.dictprovider/words/id

    ContentProvider: an extended class public class DictProvider extends ContentProvider which provides query, insert, delete, update functions.

    ContentResolver:

    1
    2
    ContentResolver contentResolver = getContentResolver();
    contentResolver.insert(Words.Word.DICT_CONTENT_URI, values);

    Most system applications provide their own ContentProvider, we need to know their Uri.

Adapter:

Adapters are the link between a set of data (ArrayList, Cursor) and the AdapterView (ListView, GridView, Spinner) that displays the data. AdapterViews are ViewGroups that display child views given to it by an adapter.

  1. ArrayAdapter:

    In the simplest case, just use the String array items

    1
    2
    3
    ArrayAdapter<String>aa = new ArrayAdapter<String>(this, adnroid.R.layout.simple_spinner_item, items);
    aa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spin.setAdapter(aa);

    Extend ArrayAdapter to satisfy your own needs,

    1
    2
    3
    4
    MyArrayAdapter adapter = new MyArrayAdapter(this, R.layout.my_list_view, MyObjectItemData);
    ListView listViewItems = new ListView(this);
    listViewItems.setAdapter(adapter);
    listViewItems.setOnItemClickListener(new OnItemClickListenerListViewItem());

    The code for class MyArrayAdapter is here. The code for class OnItemClickListenerListViewItem is here. Note here inflate is used to convert XML format to View. One trick is to check whether convertView is null so that duplicated reflation could be avoided, otherwise your device would be slowed down when crolling the screen. ConvertView can be bined with a newly defined class by using setTag and getTag. When the adapter is changed (e.g., add a new row), adapter.notifyDataSetChanged().

  2. CursorAdapter:

    1
    2
    SimpleCursorAdapter adapter=new SimpleCursorAdapter(this, R.layout.row, constantsCursor, new String[] {"tag", "value"}, new int[] {R.id,tag, R.id.value});
    listviewItems.setAdapter(adapter);

    Extend CursorAdapter, see here

XML format:

  1. Use XML to format Layout: In XML file, android:id="@+id/button. In Java, btn=(Button)findViewById(R.id.button). Similarly, in XML file, android:id="@string/app_name, in Java, Resources myres = getResources(); myres.getString();.

  2. Use XML to format componenet style: in res\values\text_style.xml, in \res\layout\main.xml, style="@style/style2".

  3. Use XML to format window style: in res\values\window_style.xml, in onCreate() function, add setTheme(R.style.crazytheme), or <application android:theme="@style/crazytheme">.

  4. Use XML to format menu style: \res\menu\contextmenu_style.xml optionmenu_style.xml.

    1
    2
    3
    MenuInflater inflator = new MenuInflater(this);
    inflator.inflate(R.menu.my_menu, menu);
    //return super.onCreateOptionsMenu(menu);
  5. Use XML to inflate a view and thus format dialogue style, click login.xml

    1
    2
    TableLayout loginForm = (TableLayout)getLayoutInflater().inflate(R.layout.login, null);
    ad.setView(loginForm);

Event:

  1. Add EventListener: there exist several types of implement. We take the most common event “click” as an example to demonstrate five types of implements.

    • Override function onClick in class OnClickListener

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      	button1.setOnClickListener(new OnClickListener(){ 
      public void onClick(View v){
      });
      ```
      * Extend class `OnClickListener`, essentially equal to a)
      ```android
      private Button1_OnClickListener mListener1 = new Button1_OnClickListener();
      class Button1_OnClickListener implements OnClickListener {
      public void onClick(View v) {
      }

      mButton1.setOnClickListener(mListener1);
    • Bind event listener in XML

      1
      2
      3
      android:onClick="clickHandler"

      function clickHandler(){

      For key event:

      1
      2
      3
      new OnKeyListener(){
      public boolean onKey(View source, int keyCode, KeyEvent event{
      switch(event.getKeyCode())

      For long click:

      1
      2
      new OnLongClickListener{
      public boolean onLongClick(View source){
  2. Override Recall Function: extend View or Activity class to override event recall functions.

    * Extends Activity Class 
     
    1
    2
    3
    4
    5
    public class TestEvent2 extends Activity implements OnClickListener{
    public void onClick(View v) {

    public class TestEvent2 extends Activity{
    boolean onKeyDown(int keycode, KeyEvent event){
    • Extends View Class
      1
      2
      3
      4
      5
      public class MyButton extends Button{
      public boolean onKeyDown(int keyCode, KeyEvent event){

      public class DrawView extends View{
      public boolean onTouchEvent(MotionEvent event){

Layout:

  1. Common attributes

    1
    2
    3
    4
    android:layout_width|height="fill_parent"|"wrap_content"|"10dip"	
    android:gravity="center_horizontal"|"right"
    android:background="#FF909090"
    android:padding="3dip"
  2. FrameLayout: fundamental layout, allow overlap or replacement for flexible usage.

  3. LinearLayout: example code

    1
    android:layout_weight="1"
  4. AbsoluteLayout: example code

    1
    android:layout_x|layout_y="250dip"
  5. RelativeLayout: example code

    1
    2
    3
    4
    5
    android:layout_below="@id/label"
    android:layout_toLeftOf="@id/ok"
    android:layout_alignParentRight="true"
    android:layout_alignTop="@id/ok"
    android:layout_marginLeft="10dip"
  6. TableLayout: example code

    1
    2
    android:layout_span="3"
    android:layout_column="2"
  7. Make the layout scrollable, add <ScrollView> as in example code

Componenet:

  1. EditText | TextView example code

  2. RadioGroup example code

  3. CheckBox example code

  4. Spinner: dropdown menu example code

  5. ListView: example code

  6. GridView: example code

  7. OptionsMenu: in the corner of screen example code

  8. ContextMenu: long press to show the menu. example code.

Advanced Componenet:

  1. Picker: The DatePicker code is as follows and the TimePicker code is similar.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    Calendar dateAndTime=Calendar.getInstance();
    DatePickerDialog.OnDateSetListener mydiag=new DatePickerDialog.OnDateSetListener() {
    public void onDateSet(DatePicker view, int year, int monthOfYear,int dayOfMonth) {
    dateAndTime.set(Calendar.YEAR, year);
    dateAndTime.set(Calendar.MONTH, monthOfYear);
    dateAndTime.set(Calendar.DAY_OF_MONTH, dayOfMonth);
    updateLabel();
    }
    };

    Button btn=(Button)findViewById(R.id.dateBtn);

    btn.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v) {
    new DatePickerDialog(ChronoDemo.this, mydiag, year, month, day).show();
    }
    });

    Number picker

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    NumberPicker np = (NumberPicker) findViewById(R.id.npId);

    np.setOnValueChangedListener(new OnValueChangeListener()
    {
    public void onValueChange(NumberPicker picker, int oldVal, int newVal)
    {
    tv.setText(String.valueOf(newVal));
    }
    });

    np.setMaxValue(100);
    np.setMinValue(0);
  2. Toast

    1
    2
    3
    import android.widget.Toast;

    Toast.makeText(Demo.this, "warning msg", Toast.LENGTH_LONG).show();
  3. Notification example code

  4. Alert dialog example code

  5. Dial phone number

    • add permission in AndroidManifest.xml <uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>

    • java code

      1
      2
      Intent phoneIntent = new Intent("android.intent.action.CALL", Uri.parse("tel:" + inputStr));
      startActivity(phoneIntent);
  6. Send message

    • add permission in AndroidManifest.xml <uses-permission android:name="android.permission.SEND_SMS"/>

    • java code

      1
      2
      3
      SmsManager smsManager = SmsManager.getDefault();
      PendingIntent sentIntent = PendingIntent.getBroadcast(act, 0, new Intent(), 0);
      smsManager.sendTextMessage(addressStr, null,contentStr, sentIntent, null);
  7. Gallary example code

  8. Timer

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    new Timer().schedule(new TimerTask()
    {
    public void run()
    {
    handler.sendEmptyMessage(0x123);
    }
    }, 0, 200);

    Handler handler = new Handler()
    {
    public void handleMessage(Message msg)
    {
    if (msg.what == 0x123){
    }
    super.handleMessage(msg);
    }
    };

Gist

  1. <uses-sdk android:minSdkVersion="2" /> indicates the minimum requirement of SDK. <uses-permission android:name="android.permission.SEND_SMS" /> indicates the required permission.

  2. To utilize the resouce in res/values: in java code, , R.id….R.string….; in XML file, @id/…..@string/……

  3. Set no title or fullscreen, add the following code in AndroidManifest.xml

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    	<activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
    ```

    1. There are two types of intents: explicit and implicit. In explicit intents you provide the name of the Activity class. In implicit intents, you tell the system what to do rather than name the Activity class to launch.

    ## Game Development ##

    1. Prepare music and image resources uder folder "res"

    1. Use Handler in the MainActivity
    ```android
    hd=new Handler(){
    public void handleMessage(Message msg){
    super.handleMessage(msg);
    switch(msg.what)
  4. MenuView

    1
    2
    3
    public class ViewMainMenu extends SurfaceView implements SurfaceHolder.Callback{
    public void onDraw(Canvas canvas){
    public void surfaceCreated(SurfaceHolder holder) {
  5. Create on thread for each function

    1
    public class KeyThread extends Thread{
  6. Use GLRender for GameView, android opengl

    1
    2
    3
    4
    5
    6
    7
    8
    class MySurfaceView extends GLSurfaceView {
    public MySurfaceView(Context context) {
    super(context);
    mRenderer = new SceneRenderer();
    setRenderer(mRenderer);
    setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
    }
    class SceneRenderer implements GLSurfaceView.Renderer{

Simple Bayesian Optimization

Posted on 2022-06-16 | In paper note

We release a light-weighted user-friendly Bayesian optimization tool for tuning hyper-parameters based on Gaussian profess. The code is modified based on https://github.com/fmfn/BayesianOptimization and released on https://github.com/ustcnewly/simple_Bayesian_optimization, in which README shows the dependency and usage of the tool.

  • bo = BayesianOptimization(func, param_bound_dict): ‘func’ is a function with parameters as input and performance as output, ‘param_dict’ is a dictionary containing the upper/lower bound of each parameter.

  • bo.explore(param_value_dict, eager=True): ‘param_value_dict’ is a dictionary containing multiple parameter values. This function does no calculate the performance corresponding to the parameter values, does not add items into bo.X and bo.Y, only add new parameters. Do not forget to set eager as True to make the added parameters take effect.

  • bo.initialize(param_value_target_dict): compared with ‘param_value_dict’, ‘param_value_target_dict’ additionally contains the performance corresponding to the parameter values. This function does not add items into bo.X and bo.Y.

  • bo.maximize(init_points=5, n_iter=15, **kwargs): ‘init_points’ is to include extra points for fitting. ‘n_iter’ indicates the iterative process of inferring the next point and add it for fitting. All the init points and inferred points will be added into bo.X and bo.Y. The model is fitted on bo.X and bo.Y.

    The algorithm requires at least two initial points. When setting ‘init_points=0’, we can use ‘bo.explore’ and ‘bo.initialization’ for initialization.

    For inference, acq=’ucb’ (upper confidence bound), ‘ei’ (expected improvement) or ‘poi’ (probability of improvement). ‘poi’ and ‘ucb’ work better empirically. There is a trade-off beteween exploitation and exploration. When acq=’ucb’, smaller kappa prefers exploitation while larger kappa prefers exploration. When acq=’poi’, similarly, smaller xi prefers exploitation while larger xi prefers exploration. kappa and xi can be set within [10^-3, 10^-2, …, 10^3].

    For the Gaussian process model itself, it contains parameters like ‘kernel’ and ‘alpha’. Refer to scikit-learn for the details. When warnings occur in ‘gpr.py’, you can try using larger alpha, i.e., 10^-3.

  • bo.gp.fit(bo.X, bo.Y): use Gaussian process regression to fit bo.X and bo.Y.

  • mu, sigma = bo.gp.predict(x, return_std=True): use the learnt model to predict x, output mean and variance.

  • utility = bo.util.utility(test_params, bo.gp): return the utility of test parameters, based on which the next point is recommended.

Reasons to Reject a Paper

Posted on 2022-06-16 | In paper note

Strong reasons:

  1. Promise more than delivered (this is the first work….).
  2. Miss important references (closely related).
  3. Results are too incremental or too unconvincing, or lower than state-of-the-art.
  4. Poorly written or oraganized.
  5. Incorrect statements or statements without support.
  6. Lack of component analysis for important components.

Weak reasons:

  1. Novelty is minor or incremental. Just an extension of A, or similar to A, or combination of A and B.
  2. Motivation is unclear or arguable.
  3. No theoretical guarantee of the effectiveness.
  4. No technical contribution: too few math formulations or the proposed method is too straightforward.
  5. Formulations are too dense and hard to follow.
  6. Paper writing has some flaws (e.g., ambiguity, redundancy, a few typos or grammar mistakes).
  7. Improvement is not very significant.
  8. Lack of component analysis for less important components.
  9. Lack of qualitative analysis.
  10. Unfair or insufficient comparison with state-of-the-art. Miss some baselines. Sometimes we need to create baselines if necessary.
  11. Hyper-parameter analysis: too many hyper-parameters, unclear how to set hyper-parameter, sensitivity to hyper-parameters.
  12. No significant test.
  13. Miss some details (e.g., technical details or experimental details), not self-contained.
  14. Miss less important references.
  15. Miss analyses on time/memory/model complexity

Paper Writing

Posted on 2022-06-16 | In paper note

Paper is an information carrier to present and sell your work,so the paper should be well-written, well-organized, and easily understood. You should make the reviewer happy and buy your contribution.

Overall

  • Abstract is the extension of title.
  • Introduction is the extension of abstract.
  • Conclusion is the rewritten version of abstract.

Language

  • Make sure there is no typo and syntax mistake (you can use assistant tools like Grammarly https://app.grammarly.com/ to assist you with this tedious job).
  • For technical term, unify them throughout the paper, use at most two sayings throughout the paper. For non-technical term, use at least two sayings alternatively throughout the paper and avoid simple words. Substitutions for common simple words can be found here.
  • Your technical writing may look amateur and unprofessional. This problem should be addressed from the following two aspects: domain-invariant writing and domain-specific writing. Even if you have already written dozens of papers in one domain but plan to write a paper in another domain, you also need domain adaptation to fit the new domain.
    • Domain-invariant writing: read CV/ML papers in a wide range of fields and learn their paper writing.
    • Domain-specific writing: read papers in the related narrow field annd learn their paper writing. Generally, before I write or revise a paper in a new field, I will read at least 10 recent papers and jot down the well-written key words/phrases as raw corpus.
  • Merge fragmented short sentences into a coherent long sentence. Use connective words/phrases to glue neighboring sentences to make the transition smoother.

Structure

Writing paper is not randomly putting together what you have in mind. Intuitively, the left subimage is a poorly-written paper and the right one is a well-written paper. Imagine you can enter a cake store and the waitress serves you the left cake, the feeling is the same as that of reviewer when reading a poorly-written paper. The logic relation can be roughly categorized into “and”, “or”, “then”, “but”, “so”, “specifically”.

One paper should be well-structured, composed of hierarchical logic blocks. Writing paper is writing logic flow. Generally speaking, abstract is the extension of title, introduction is the extension of abstract, conclusion is rewritten abstract. In each section, the sentences should be clustered as hierarchical logic blocks in an agglomerative manner.

Content

  • Accuracy: Each sentence should exactly present what you want to present and cannot be ambiguous with multiple versions of interpretations.
  • Completeness: Your paper should be self-explanatory. You have to ensure that readers do not have to read extra materials to understand your paper. With all necessary ingredients, the remaining problem is the struture issue: how to organize all these ingredients.
  • Brevity: Remove redundant expressions and keep it simple. Brevity is the spirit.

Related work

  • Classify existing works into several groups. For example, “the existing works can be roughly categorized into XXX, XXX, and XXX.”
  • Compared with each group of existing works, state your difference and advantage. For example, “All these methods XXX, but XXX. In contrast, our method XXX”.

Experiment

  • For baselines in experimental section, compare with state-of-the-art baselines and yourself (e.g., ablation study or component analysis) qualitatively or quantitatively. It would be great to offer in-depth qualitative analysis.
  • When comparing with state-of-the-art baselines, the most important thing is fair comparison. Check whether the experimental settings (e.g., train/test split, features, backbone network) are the same. If the results reported in original papers are from different experimental settings, you need to run their code or even implement their method by yourself.
    • If one baseline uses more information and underperforms your method, that is OK.
    • If one baseline uses less information and outperforms your method, that is a serious problem.
    • If one baseline uses more information and outperforms your method, remove their extra information and compare with it again. Do not leave a better baseline using more information on your paper, which is extremely risky.
    • If one baseline uses less information and underperforms your method, see whether this baseline can use the extra information easily. If this baseline can incorporate the extra information in a simple way, compare with it with extra information again.

Math

  • Sometimes when it is hard to describe something using natural language, try describing it using math.
  • For each variable, please define it before using it. Merge unncessarily duplicated variables and keep as few variables as possible. Think clearly about the meaning of each variable. Sometimes, a variable was defined a long time ago and you need to help reviewer recall that variable.
  • Math expressions should be regulated and rigorous.
  • For mathematically dense paper, it would be better to start with a general instruction before entering math. For example, “a vector/matrix is denoted by a lowercase/uppercase letter in boldface. The transpose of a vector/matrix is denoted by the superscript ‘. Moreover, $A^{-1}$ is used to denote the inverse matrix of A.
    We use $\langle A,B\rangle$ (resp., $A\circ B$) to denote the inner product (resp., element-wise product) of two matrices”.

Show and Hide

  • For your contribution, you should highlight it multiple times (e.g., abstract, introduction, related work, method, experiment, and conclusion). Otherwise, the reviewer will claim your contribution is minor.
  • For your weakness, try to hide it if possible. If you could not hide it, provide a reasonable and compromising explanation.

Attack and defend

Imagine you are the reviewer, what questions are you going to ask and how the paper could be defended.

Paper Proofread

Posted on 2022-06-16 | In paper note

Do not go over the paper once and for all. Go over the paper again and again to check each rule one by one, according to the following order: High-level 6 -> High-level 1-5 -> Low-level 1-3.

Low-level

  1. Typo: Print out the paper and read the paper character by character (not word by word). You can use auxiliary tools (e.g., Grammarly) to help you check spelling and grammar mistakes. The easily made mistakes are including but not limited to: single/plural form, third-person singular, etc. When time is limited, check the most notable parts in the paper, e.g., figure and captions, table captions, section titles.

  2. Math annotation: a) All the variables are defined before used; b) Avoid repetitive use of the same symbol; c) Mind the difference between capital and small letters, boldface and plain font type; d) Unpaired brackets; e) Check the variables to be optimized; d) Punctuations (e.g., ‘,’ and ‘.’) in the formulas; e) Dimension mismatch; f) The value of each hyper-parameter is mentioned.

  3. Reference: a) no question mark ‘?’; b) Check the correctness of each reference including Citation [XXX], Table XXX, Figure XXX, Eqn. XXX, Section XXX.

High-level

  1. Objective statement: Check whether each objective statement is accurate or unambiguous. Avoid obvious collision.

  2. Subjective statement: Check whether each subjective statement is appropriate. For example, “XXX cannot XXX”, “the first XXXX”, “all XXXX”. Avoid too strong subjective statement.

  3. Experimental results: Check whether your experimental results are reasonable. For example, A is quite similar to B, but far better/worse than B. A uses more information than B, but underperforms B.

  4. Experimental observation: Check whether your comments on experimental results are correct.

  5. Important references: Make sure all important references appear in your paper.

  6. Fill in holes: Imagine your are the reviewer, what questions will you ask? Answer them in the paper before they heckle you.

My Clumsy Research Experience

Posted on 2022-06-16 | In paper note
  1. Entering a new research field

  2. How to come up with ideas

  3. Ensure the novelty of your idea

  4. Determine experimental setting and conduct experiments

  5. Paper writing

  6. Paper proofread

1…678…24
Li Niu

Li Niu

237 posts
18 categories
112 tags
Homepage GitHub Linkedin
© 2025 Li Niu
Powered by Hexo
|
Theme — NexT.Mist v5.1.4