sohamghosh121 / unsupervised-backpropagation Goto Github PK
View Code? Open in Web Editor NEWMatrix Imputation using Unsupervised Backpropagation
Matrix Imputation using Unsupervised Backpropagation
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.