ArticleslgStudy

computer science

Portable Format for Analytics

Portable Format for Analytics is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Portable Format for Analytics rather than just read about it. In short: The Portable Format for Analytics (PFA) is a JSON-based predictive model interchange format conceived and developed by Jim Pivarski. PFA provides a way for analytic applications to describe and exchange predictive models produced by analytics and machine learning algorithms.

Portable Format for Analytics — main illustration
Portable Format for Analytics — illustration

Key takeaways

  • Portable Format for Analytics belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Portable Format for Analytics to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Portable Format for Analytics from memory before moving on to harder problems.

Reference excerpt

The Portable Format for Analytics (PFA) is a JSON-based predictive model interchange format conceived and developed by Jim Pivarski. PFA provides a way for analytic applications to describe and exchange predictive models produced by analytics and machine learning algorithms. It supports common models such as logistic regression and decision trees. Version 0.8 was published in 2015. Subsequent versions have been developed by the Data Mining Group. As a predictive model interchange format developed by the Data Mining Group, PFA is complementary to the DMG's XML-based standard called the Predictive Model Markup Language or PMML.

Release history

Data Mining Group The Data Mining Group is a consortium managed by the Center for Computational Science Research, Inc., a nonprofit founded in 2008.

Examples reverse array: # reverse input array of doubles input: {"type": "array", "items": "double"} output: {"type": "array", "items": "double"} action: - let: { x : input} - let: { z : input} - let: { l : {a.len: [x]}} - let: { i : l} - while : { ">=" : [i,0]} do: - set : {z : {attr: z, path : [i] , to: {attr : x ,path : [ {"-":[{"-" : [l ,i]},1]}] } } } - set : {i : {-:[i,1]}} - z

Bubblesort input: {"type": "array", "items": "double"} output: {"type": "array", "items": "double"} action: - let: { A : input} - let: { N : {a.len: [A]}} - let: { n : {-:[N,1]}} - let: { i : 0} - let: { s : 0.0} - while : { ">=" : [n,0]} do : - set : { i : 0 } - while : { "<=" : [i,{-:[n,1]}]} do : - if: {">": [ {attr: A, path : [i]} , {attr: A, path:[{+:[i,1]}]} ]} then : - set : {s : {attr: A, path: [i]}} - set : {A : {attr: A, path: [i], to: {attr: A, path:[{+:[i,1]}]} } } - set : {A : {attr: A, path: [{+:[i,1]}], to: s }} - set : {i : {+:[i,1]}} - set : {n : {-:[n,1]}} - A

Implementations Hadrian (Java/Scala/JVM) - Hadrian is a complete implementation of PFA in Scala, which can be accessed through any JVM language, principally Java. It focuses on model deployment, so it is flexible (can run in restricted environments) and fast. Titus (Python 2.x) - Titus is a complete, independent implementation of PFA in pure Python. It focuses on model development, so it includes model producers and PFA manipulation tools in addition to runtime execution. Currently, it works for Python 2. Titus 2 (Python 3.x) - Titus 2 is a fork of Titus which supports PFA implementation for Python 3. Aurelius (R) - Aurelius is a toolkit for generating PFA in the R programming language. It focuses on porting models to PFA from their R equivalents. To validate or execute scoring engines, Aurelius sends them to Titus through rPython (so both must be installed). Antinous (Model development in Jython) - Antinous is a model-producer plugin for Hadrian that allows Jython code to be executed anywhere a PFA scoring engine would go. It also has a library of model producing algorithms.

References

External links Official website pfa on GitHub PFA 0.8.1 Specification PFA Document Structure Python Multi-User Rest-Api Server for Deploying Portable Format For Analytics Titus 2 : Portable Format for Analytics (PFA) implementation for Python 3

Worked examples

Example 1 — a first encounter with Portable Format for Analytics

Start with the simplest possible case. Write down what Portable Format for Analytics claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Portable Format for Analytics before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Portable Format for Analytics ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Portable Format for Analytics

In research
Portable Format for Analytics appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Portable Format for Analytics in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Portable Format for Analytics is common in secondary-school and first-year university syllabi. It links to neighbouring topics Applied machine learning, Domain-specific knowledge representation languages, so understanding it makes those chapters shorter.
In everyday life
Look for Portable Format for Analytics outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Portable Format for Analytics in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Portable Format for Analytics means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Portable Format for Analytics out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Portable Format for Analytics in simple terms?

The Portable Format for Analytics (PFA) is a JSON-based predictive model interchange format conceived and developed by Jim Pivarski. PFA provides a way for analytic applications to describe and exchange predictive models produced by analytics and machine learning algorithms.

Why does Portable Format for Analytics matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Portable Format for Analytics?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Portable Format for Analytics.

Tags

  • Applied machine learning
  • Domain-specific knowledge representation languages

Keep exploring