owned this note
owned this note
Published
Linked with GitHub
# Proposal Inverter: Matrix Factorization
### Brief Introduction
This matrix factorization is inspired off of the Netflix recommendation system, and is meant to give us a value that evaluates the likelihood of an agent to fund a proposal based on certain features present in the proposal. It is meant to give a practical, real life scenario, in order to simplify translating different wallet and user types into vectors. In this use case, we will be using 5 different wallet types and 5 different features that are present in proposals. If a wallet has a preference amongst these features, and these preffered features are present in a proposal, the wallet is more likely to fund said proposal.
### Wallet Types
**Loyal:** Investors that are more likely to contribute to a proposal of close proximity (equivalent: location).
**Frugal:** Cautious investors that are less likely to consider proposals with high complexity (equivalent: complexity/simplicity).
**Time Sensitive:** Investors that are time sensitive(equivalent: time commitment).
**Greedy:** Investors that are chiefly interested in the potential returns of a proposal(equivalent: profitability).
**Philanthropic:** Investors that are interested in proposals geared towards a humanitarian, charitable, or environmentally sensitive purpose (equivalent: environmental/humanitarian).
### Proposal Feature Types
**F1 - Location:** The location of a proposal's team/location of the area affected by the proposal.
**F2 - Complexity/Simplicity:** The complexity/simplicity of a proposal.
**F3 - Time Commitment:** The time commitment required for a proposal.
**F4 - Profitability:** The potential profitability of a proposal.
**F5 - Environmental/Humanitarian:** Whether a proposal is geared towards an environmental/humanitarian cause.
## Use Case Example
### Wallet Matrix
The wallet matrix is meant to represent the degree in which a wallet is similar to a wallet type, since a wallet can be both philanthropic and loyal, or greedy and time-sensitive. A wallet is not restricted to one wallet type. The wallet Matrix's rows represent wallets and the columns represent features
| | F1 | F2 | F3 | F4 | F5 |
| -------- | -------- | -------- | -------- | -------|-------|
| W1 | 0.98 | 0.76 | 0.79 | 0.13| 0.45 |
| W2 | 0.37 | 0.93 |0.64|0.82 |0.44 |
| W3 | 0.23 | 0.55 |0.06| 0.83 | 0.63 |
| W4 | 0.76 | 0.35 |0.97 | 0.89 | 0.78 |
| W5 | 0.19 | 0.47 |0.04 |0.15 |0.68 |
### Proposal Matrix
The proposal matrix is meant to represent the degree of presence of each feature in a proposal. The proposal matrix's rows represent features and the columns represent proposals
| | P1 | P2 | P3 | P4 | P5 |P6 | P7 | P8 |
| -------- | -------- | -------- | -------- | -------|-------| -------- | -------|-------|
| F1 | 0.74 | 0.19 | 0.44 | 0.8 | 0.2 |0.78 | 0.67 | 0.55 |
| F2 | 0.97 | 0.13 | 0.83|0.39 |0.01 |0.46| 0.47 | 0.56 |
| F3 | 0.33 | 0.48 | 0.7| 0.29 | 0.79 |0.57 |0.57| 0.3 |
| F4 | 0.37 | 0.23 | 0.31|0.68|0.66|0.14| 0.76 | 0.03 |
| F5 | 0.47 | 0.67 | 0.83 |0.14|0.7 |0.11 | 0.63 | 0.44|
## Proposal Wallet Product Matrix
| | P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 |
| --- | --- | ---- | ---- | ---- | ---- | ---- | ---- | ----- |
| W1 | 1.98 | 0.99 | 2.02 | 1.46 | 1.22 | 1.63 | 1.84 | 1.41 |
| W2 | 1.89 | 0.98 | 2.01 | 1.47 | 1.45 | 1.25 | 1.96 | 1.14 |
| W3 | 1.33 | 0.76 | 1.39 | 1.07 | 1.09 | 0.66 | 1.48 | 0.76 |
| W4 | 1.52 | 1.37 | 2.23 | 1.74 | 2.06 | 1.52 | 2.40 | 1.28 |
| W5 | 0.99 | 0.61 | 1.12 | 0.55 | 0.66 | 0.49 | 0.93 | 0.68 |
The table entries represent the likelihood for a wallet to fund a proposal, which is dependant on whether a proposal has the features than an investor is looking for in a proposal.
For example, Wallet 1 (W1) values a proposal that is local and is geared towards an environmental purpose. If W1 is based in BC, and P1 is the Centree project, an environmentally driven proposal based in BC, then W1 is more likely to contribute to it. In the table above, the effects of a proposal's features are clear, since P1 has high environmental factors and location factors, the likelihood of W1 to invest in P1 is 5.4, which is the highest likelihood for a wallet to invest in P1. Let $PW_1$ be the likelihood of W1 to fund P1, $W_1$ be the first row of wallet matrix and $P_1$ be the first column of proposal matrix.
$$ PW_1 = W_1 * P_1 =(0.8)(3) + (0.2)(1) + (0.1)(2) + (0.1)(2) + (0.6)(4) = 5.4 $$
## Matrix Normalisation
The last step is to normalise the matrix, in order to present the data in more clearly so that every value is within the range (0-1). We will use a function 'norm' from the Python library NumPy to get the matrix norm.
$$ norm = 9.08 $$
We will divide each value in the matric by this number & the result will be our final, normalised matrix.
| | P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 |
| --- | --- | ---- | ---- | ---- | ---- | ---- | ---- | ----- |
| W1 | 0.22 | 0.11 | 0.22 | 0.16 | 0.13 | 0.18 | 0.20 | 0.15 |
| W2 | 0.21 | 0.11 | 0.22 | 0.16 | 0.16 | 0.14 | 0.22 | 0.13 |
| W3 | 0.15 | 0.08 | 0.15 | 0.12 | 0.12 | 0.07 | 0.16 | 0.08 |
| W4 | 0.21 | 0.15 | 0.25 | 0.19 | 0.23 | 0.17 | 0.26 | 0.14 |
| W5 | 0.11 | 0.07 | 0.12 | 0.06 | 0.07 | 0.05 | 0.10 | 0.07 |
## Austin's Notes
You can delete this later.
I think the features of the wallets and proposals, referring to the wallet types and proposal types, or maybe we call them characteristics or features, should be the same. The reason for this is because when we are multiplying the wallet matrix $W$ and the proposal matrix $P$, the dot product is
$$Pr_{ij} = \sum_k W_{ik} P_{kj}$$
This means that the $k$th column element in $W$ will always be multiplied with the $k$th row element in $P$. In other words, the $k$th column in $W$ always corresponds with the $k$th row in $P$. In your example, the dominant terms are $0.8 * 3 + 0.6 * 4$, which makes up $4.8 / 5.4 = 88\%$ of the total value. This really only makes sense if the terms multiplied together measure the same thing, rather than $(\text{frugality} \times \text{location}) + (\text{greediness} \times \text{complexity})$.
Instead it should be something like $(\text{location} \times \text{location}) + (\text{skill} \times \text{complexity})$, if we assume that people are more willing to contribute to local proposals and proposals whose complexity match their skill level.
---
# Matrix factorization: Features
On a very high-level we are trying to simulate behaviour of people interacting with the Proposal Inverter. For this we need to derive believes about people interacting with the Proposal Inverter and thus the resulting action they take.
In order to think about what does it take for an agent to take a action we can think intuitively break down to see what it takes to make an action:
- **Objective** of the agent
- **Perception** of the situation
- **Ability** to perform an action
The three categories can structure thought about which features may influence an agent to take a certain action. A first attempt of this was made below for brokers (i.e. payee usually a squad) and payers (i.e. funders of a proposal) and proposal itself.
**Potential features of Funders (or Wallet Types)**
- Objectives
- Utility → maximises perceived utility of a proposal
- Profitability → optimises the financial pay-off
- Popularity → maximises funding of most popular proposals
- Understanding → maximizes proposal of which it can best predict outcome
- Success → maximes proposal that most likely result in will complete
- Collaboration (funders) → attempt to get fund among the most diverse funder group
- Collaboration (brokers) → attempt to get fund the most diverse broker group
- Nationalist → funds exclusively brokers affiliated with him
- Risk → subjective riskiness of a proposal
- Perception
- Information collection
- Knowledge about other proposals
- Knowledge about environmental factors
- Beliefs
- Belief about the character of other funders
- Belief about brokers
- Belief about the macro environment (market prices)
- Ability
- Rationality vs irrational → Makes optimal choice for a given objective
- Reaction speed → Ability to react to environmental changes
- Rational: if the funder is a DAO, a voting mechanism prevent an immediate reaction because additional funding needs to be approved.
- Awareness of impact of actions → Ability to see how action impact of agent impact
- Awareness of environment → ability to see other proposals and opportunity and act on them
- Foresight → Ability to predict the development of the environment
**Potential features of Brokers (or Wallet Types)**
- Objectives
- Token maximalist → optimises the amount of token he collects
- Profit-maximalist → optimises the amount dollar value of proposal inverter
- Mercenary → completes project but at the time of commitment is looking for profit
- Cult member → loyalty to one DAO (owner/ initiator of the proposal)
- Security → optimises for the most stable returns in dollar value
- Accomplice → works only if certain other brokers are present
- Enjoyment → maximises perceived fun
- Self-interest → degree to which subjective objective will be pursed
- Perception
- Information collection
- Knowledge about other proposal
- Knowledge about environmental factors
- Believes
- Believe about character (and thus action) of funders
- Believe about character (and thus action) of other brokers
- Believe about the macro environment (market prices)
- Ability
- Skill set for a given proposal
- Rationality vs irrational → Makes optimal choice for a given objective
- Reaction speed → Ability to react to environmental changes
- Rational: if the funder is a DAO, a voting mechanism prevent an immediate reaction because additional funding needs to be approved.
- Awareness of impact of actions → Ability to see how action impact of agent impact
- Awareness of environment → ability to see other proposals and opportunity and act on them
- Foresight → Ability to predict the development of the environment
**Proposal features**
- Profitability
- Risk
- Popularity
- Usefulness/ need
- Time frame
- Location
- Participating squads
- Success rate
**Additional features to consider:**
- Environmental factors
- Action Space
**Incorporate a set of different agents:**
Source:https://www.educba.com/agents-in-artificial-intelligence/
- Reflexive Agents
- Agents that keep track of the world
- Goal based agents
- Utility agents