GithubHelp home page GithubHelp logo

unsupervised-backpropagation's Introduction

unsupervised-backpropagation

Matrix Imputation using Unsupervised Backpropagation

This is a Theano based Python implementation of the unsupervised backpropagation algorithm described in https://arxiv.org/pdf/1312.5394.pdf for matrix imputation.

unsupervised-backpropagation's People

Contributors

sohamghosh121 avatar

Watchers

James Cloos avatar  avatar paper2code - bot avatar

unsupervised-backpropagation's Issues

Use with Categorical Data

Hello,

I am trying to use the UBP.py class with categorical data, and it is outputting all 1's. I am aware that the publication says to one-hot encode the categories and predict each one, selecting the mode from the categorical distribution. However, I am unsure how to do so with the UBP.py script.

I tried running it as-is, and I think that it is saving the output to X_reconstructed. Is that correct? If so, I tried to return X_reconstructed and all the values in the dataset were 1.0, even the values that did not have missing data.

Here is the code that I used to run it. I added this to the end of init() in the UBP.py class:

self.impute(self.X,  3, 3, [100, 100, 100])
imputed = self.predict()
print(imputed)
print(imputed.shape)

def predict(self):
    return self.X_reconstructed

Do you know how I could get it to work with categorical data, or why it would be outputting an array of all 1's?

Thanks,

-Bradley

RMSE: nan

Hello @sohamghosh121
I've tried to run your script but had trouble, here's my test example:


from UBP import Imputer
import pandas as pd
import numpy as np

X = pd.DataFrame([[1,2,3,4,5, 6, np.nan], [5,5,5,5,5, np.nan, 5]]).T.astype(np.float32).values

imp = Imputer(X, 1, 1, [10])
imp.impute()

Here's the result I get and it keeps looping forever

* Running imputation
* Initial RMSE: 3.55216297909
* #### Phase  1
Epoch took 6.776763281474511e-05 m
Epoch took 5.038633244112134e-05 m
Epoch took 4.993090018009146e-05 m
Epoch took 4.95495837337027e-05 m
Epoch took 4.9610216713820894e-05 m
Epoch took 5.0451583229005335e-05 m
Epoch took 4.677378262082736e-05 m
Epoch took 4.657153234196206e-05 m
Epoch took 4.653114980707566e-05 m
Epoch took 4.677001658516626e-05 m
* Epochs: 10 	 RMSE: nan

Do you have any comment on fixing this? Can you give me usage examples please?
Thanks

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.