Opened 16 years ago

Closed 16 years ago

#238 closed defect (invalid)

clone function in DataLookup2D returning pointer to new DataLookup2D based on subset of features

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.4
Component: classifier Version: trunk
Keywords: Cc:


This is needed for ticket:236 (see discussion there)

virtual const DataLookup2D* *some good name*(const std::vector<size_t>& features) const=0;

The returned DataLookup2D is dynamically located and the caller owns the object. It should be pretty clear how these should be implemented.

What should the name of function be???

In KernelLookup? it is already implemented as a function selected. If we decide for a different name, will we then remove the function kernel? That implies breaking contract and stuff, but we are still in 0.x which could be save.

Change History (4)

comment:1 Changed 16 years ago by Markus Ringnér

If kernel selected is used by us in (more than a few) places the we should stick to that name. Otherwise my vote goes for the name select_features.

comment:2 Changed 16 years ago by Peter

Owner: changed from Markus Ringnér to Peter
Status: newassigned

grep selected *.cc in /yat/classifier/ results in              data_ = other.data_->selected(index);                      data_w_ = other.data_w_->selected(index);        KernelLookup::selected(const std::vector<size_t>& inputs) const                        // matrix with selected features        MatrixLookup::selected(const std::vector<size_t>& i) const        MatrixLookupWeighted::selected(const std::vector<size_t>& i) const                                             const KernelLookup* kl = kernel->selected(features_.back());

That is not more than a few places, I would say. It is a surpise that is pops up in MatrixLookup? and MatrixLookupWeighted?.

I'll fix this and change name to selected_features.

comment:3 Changed 16 years ago by Peter

ooh you suggested select_features that is even better.

comment:4 Changed 16 years ago by Peter

Resolution: invalid
Status: assignedclosed

Functionality, already exists. I don't change name of the function.

Note: See TracTickets for help on using tickets.