Coder Social home page Coder Social logo

coreg's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

coreg's Issues

data_utils module can't be found

Hi nealjean,
thank you for the very interesting research paper and code example.
I want to rebuild the Coreg algorithm and apply it in my current university project.
But it seems, that the data_utils module for the function load_data can't be found anymore.

Is there a convenient alternative to it?

Regards,
Anton

It seems that the true labels of unlabeled training set might be used while training COREG.

I'm a phd student and I'm doing research into semi-supervised regression now. When searching about COREG, I find you have reproduced it in Github.
However, when I read function _compute_deltas below,

coreg/source/coreg.py

Lines 144 to 162 in 2ec44e2

def _compute_deltas(self, L_X, L_y, h, h_temp):
"""
Computes the improvements in local MSE for all points in pool.
"""
deltas = np.zeros((self.U_X_pool.shape[0],))
for idx_u, x_u in enumerate(self.U_X_pool):
# Make prediction
x_u = x_u.reshape(1, -1)
y_u = self.U_y_pool[idx_u].reshape(1, -1)
y_u_hat = h.predict(x_u)
# Compute neighbors
omega = h.kneighbors(x_u, return_distance=False)[0]
# Retrain regressor after adding unlabeled point
X_temp = np.vstack((L_X, x_u))
y_temp = np.vstack((L_y, y_u))
h_temp.fit(X_temp, y_temp)
delta = self._compute_delta(omega, L_X, L_y, h, h_temp)
deltas[idx_u] = delta
return deltas

I am surprised to find that you use y_u in line 152 rather than y_u_hat in line 153 to train h_temp, and using self.U_y_pool to add to training sets in line 218 of coreg.py. .

coreg/source/coreg.py

Lines 215 to 221 in 2ec44e2

if max(deltas) > 0:
self.to_add['x' + str(idx_h)] = self.U_X_pool[np.argmax(
deltas)].reshape(1, -1)
self.to_add['y' + str(idx_h)] = self.U_y_pool[np.argmax(
deltas)].reshape(1, -1)
self.to_add['idx' + str(idx_h)] = self.U_idx_pool[np.argmax(
deltas)]

Since both y_u and self.U_y_pool are parts of true labels of unlabeled training set self.y_unlabeled or self.U_y,
y_u = self.U_y_pool[idx_u].reshape(1, -1)

coreg/source/coreg.py

Lines 241 to 242 in 2ec44e2

self.U_X_pool, self.U_y_pool, self.U_idx_pool = shuffle(
self.U_X, self.U_y, range(self.U_y.size))

and the variable y_u_hat which stores the estimated labels of unlabeled training set is mentioned only once in the file, I am doubtful whether you use the true labels of unlabeled training set in training process. In my opinion, unlabeled y shouldn't be used in training in semi-supervised learning task.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.