uwdata / draco Goto Github PK
View Code? Open in Web Editor NEWVisualization Constraints and Weight Learning
Home Page: https://uwdata.github.io/draco/
License: BSD 3-Clause "New" or "Revised" License
Visualization Constraints and Weight Learning
Home Page: https://uwdata.github.io/draco/
License: BSD 3-Clause "New" or "Revised" License
We should aim to not rely too much on files in our APIs. It makes it really hard to write in memory algorithms. Instead, we should mooe around in-memory objects and handle IO separately. I added a few TODOs in the code to show where I see problems.
Speed up development
For example, load_from_vl_json
should be load_query_from_json
Figure out what pairs of visualization we should ask an expert for labels.
A simple viewer where we can look at visualizations and see what soft constraints they violate.
Check only against hard constraints.
Given a partial spec, and a set of hard constraints, sample from the set of all possible full specs that satisfies these hard constraints.
Sort scales as feature
For example, bin: 3
is not valid.
We should be parsing this spec correctly. Right now, we expect zero and log not to be nested under scale.
{
"encoding": {
"x": {
"bin": 10,
"field": "horsepower",
"type": "quantitative"
},
"y": {
"aggregate": "count",
"scale": {
"zero": True
},
"type": "quantitative"
}
},
"mark": "bar"
}
Get a list of wrong predictions. Quickly view them.
Running run_pipeline.sh examples/ab.json
results in a bad result:
The field of encoding e0 is "e1" in the generated file, where "e1" is an encoding id not a field.
The result is supposed to be either a
or b
for the field.
FYI, soft constraints generated:
% ====== Data definitions ======
fieldtype(a,string).
cardinality(a,3).
fieldtype(b,number).
cardinality(b,6).
% ====== Query constraints ======
mark(bar).
encoding(e0).
channel(e0,x).
:- not field(e0,_).
:- not type(e0,_).
%0 { log(e0) } 1.
%0 { zero(e0) } 1.
encoding(e1).
channel(e1,y).
:- not field(e1,_).
type(e1,quantitative).
aggregate(e1,max).
%0 { log(e1) } 1.
%0 { zero(e1) } 1.
Generated full spec:
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.0.json",
"data": {
"url": "examples/data/ab.csv"
},
"encoding": {
"x": {
"field": "e1",
"type": "ordinal"
},
"y": {
"aggregate": "max",
"field": "b",
"scale": {
"zero": true
},
"type": "quantitative"
}
},
"mark": "bar"
}
(I will keep adding to this list)
left, right, both are bad. Red color.
task - mark
task - channel
Users should be able to express whether a field is considered important or not.
Options for adding this are
Use a single app without ejecting.
We need pairs that we can ask the user for labels. These pairs should cover interesting correlations.
Some constraints may not be strict but should be above the soft constraints. I don't have time to add this anytime soon, though.
To be between -1000 and +1000.
We could use https://vega.github.io/vega/usage/#view instead of creating an SVG and inlining that.
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.