Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiview MORF with two same number of feature set input #92

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 32 additions & 15 deletions sktree/tree/manifold/_morf_splitter.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -281,21 +281,38 @@ cdef class BestPatchSplitter(BaseDensePatchSplitter):
# (\prod_i self.patch_dims_buff[i])
cdef SIZE_t patch_size

for proj_i in range(0, max_features):
# now get the top-left seed that is used to then determine the top-left
# position in patch
# compute top-left seed for the multi-dimensional patch
top_left_patch_seed, patch_size = self.sample_top_left_seed()

# sample a projection vector given the top-left seed point in n-dimensional space
self.sample_proj_vec(
proj_mat_weights,
proj_mat_indices,
proj_i,
patch_size,
top_left_patch_seed,
self.patch_dims_buff
)
rand_feature_set = rand_int(0,1,random_state)
if rand_feature_set == 0:
for proj_i in range(0, max_features):
# now get the top-left seed that is used to then determine the top-left
# position in patch
# compute top-left seed for the multi-dimensional patch
top_left_patch_seed, patch_size = self.sample_top_left_seed()

# sample a projection vector given the top-left seed point in n-dimensional space
self.sample_proj_vec(
proj_mat_weights,
proj_mat_indices,
proj_i,
patch_size,
top_left_patch_seed,
self.patch_dims_buff
)
else:
for proj_i in range(self.n_features/2, self.n_features/2 + max_features):
# now get the top-left seed that is used to then determine the top-left
# position in patch
# compute top-left seed for the multi-dimensional patch
top_left_patch_seed, patch_size = self.sample_top_left_seed()

# sample a projection vector given the top-left seed point in n-dimensional space
self.sample_proj_vec(
proj_mat_weights,
proj_mat_indices,
proj_i,
patch_size,
top_left_patch_seed,
self.patch_dims_buff)

cdef void sample_proj_vec(
self,
Expand Down
Loading