mims-harvard / scikit-fusion Goto Github PK
View Code? Open in Web Editor NEWscikit-fusion: Data fusion via collective latent factor models
License: Other
scikit-fusion: Data fusion via collective latent factor models
License: Other
Hi there,
I'm trying to use skfusion with my data, but I feel there is so little documentation describing functions and object types. I'm doing a little of reverse engineering from example data, so far I've got that fuser.factor(factor_name)
returns the matrix for a specifed factor and fuser.backbone(relation_name)
returns the backbone matrix for a specified relations. Options for ObjectType
, Relation
, FusionGraph
objects are not described, neither Dfmf
options are. Also, a good hint guide about choosing matrix ranks would help.
Two issues occur when working with small samples:
import numpy as np
from skfusion import fusion
R12 = np.random.rand(30, 40)
R23 = np.random.rand(40, 50)
t1 = fusion.ObjectType('Type 1', 2)
t2 = fusion.ObjectType('Type 2', 9)
t3 = fusion.ObjectType('Type 3', 1)
relations = [fusion.Relation(R12, t1, t2),
fusion.Relation(R23, t2, t3)]
fusion_graph = fusion.FusionGraph(relations)
fuser = fusion.Dfmf()
fuser.fuse(fusion_graph)
yields: KeyError: (ObjectType("Type 1"), ObjectType("Type 3"))
the code works if t3 rank is >= 2
Running:
import numpy as np
from skfusion import fusion
R12 = np.random.rand(30, 4)
R23 = np.random.rand(4, 50)
t1 = fusion.ObjectType('Type 1', 2)
t2 = fusion.ObjectType('Type 2', 9)
t3 = fusion.ObjectType('Type 3', 2)
relations = [fusion.Relation(R12, t1, t2),
fusion.Relation(R23, t2, t3)]
fusion_graph = fusion.FusionGraph(relations)
fuser = fusion.Dfmf()
fuser.fuse(fusion_graph)
yield numpy warning and reconstructed matrices have NaN. This works if R12 has second dimension greater than 4.
In the file README.md
: the links to the slides in the tutorial section are no longer functional.
The lines in question:
https://github.com/mims-harvard/scikit-fusion/blob/88dd02cc43a43c1c554602b5da6120de0128f188/README.md?plain=1#L128L129
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.