Skip to content

Random Projection #33

@lck1201

Description

@lck1201

I see the paper《Random projection in dimensionality reduction: Applications to image and text data》,which is quite different from your code.

        // RNG random_generator(i);
        Mat_<double> random_direction(landmark_num_ , 2);
        random_generator.fill(random_direction, RNG::UNIFORM, -1.1, 1.1);

        normalize(random_direction,random_direction);
        vector<double> projection_result(regression_targets.size(), 0);  //size = (1, image_num)
        // project regression targets along the random direction 
        for(int j = 0; j < regression_targets.size(); j++){ //for each sample
            double temp = 0;
            temp = sum(regression_targets[j].mul(random_direction))[0]; 
            projection_result[j] = temp;
        } 

However, in the paper,
image
The left of equation is the projected result, k is the lower dimension, d is the current dimension, N is the number of data. Your projection matrix(random_direction),however, is not consistent with the paper. Neither the computation is.

Second, you fill the matrix by random_generator.fill(random_direction, RNG::UNIFORM, -1.1, 1.1);
In the paper,
image
It subjects itself to some distribution. So what's your consideration of generating total random matrix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions