Skip to main content

· 4 min read

!!! Es wurden nur 1-2 verschiedene Quellen angegeben, allerdings sind die meisten Aussagen nicht wirklich kontrovers. Die meisten Dinge lassen sich schnell auf Investopedia oder anderen Seiten finden. Ich war nur zu faul alles anzugeben.

Timeframe

~15 years

ETF

ETFs sind wie Fonds, kleine Anteile von Unternehmen in "Packet". Kann dadurch über verschiedene Branchen und über die ganze Welt geographisch gestreut werden. Daraus folgt, dass nicht mehr in bestimmte Unternehmen, sondern in den gesamten Markt investiert wird.

Der Unterschied von ETFs im Vergleich zu Fonds ist das Management. Fonds werden von Angestellten von Banken gemanaged und aktiv Aktien hinzugefügt oder verkauft. Dies ist mit Personalkosten verbunden. ETFs werden automatisch gemanaged und versuchen so genau wie möglich einem Index zu folgen. Diese Indizes werden auf Basis von bestimmten Regeln aufgestellt. Mcsi world setzt sich beispielsweise aus den top (70%) Unternehmen mit den höchsten Marktkapitalisierung aus bestimmten Ländern zusammen. Die Kostenunterschiede zwischen ETFs und aktiven Fonds beträgt meist ~1%.

Diese Differenz muss durch die Experten der Banken, welche diese Fonds managen, zusätzlich zu der Rendite des ETFs erreicht werden, sodass der Fond ein besseres Investment als der ETF ist. Dies wird meist nicht erreicht bzw. ist wieder ein Glücksspiel in sich selbst, da der "richtige" Fond herausgesucht werden muss und oft sind diese nicht wirklich transparent. Zudem ist es so gut wie unmöglich den Markt zu verstehen und falls Experten dies täten, würden sie vermutlich keine Fonds managen sondern selbst traden und nicht mehr arbeiten müssen.

Die Annahme, dass der Markt immer weiter steigt, ist warscheinlich korrekt. Menschen wollen schon immer mehr Dinge und ein "besseres" Leben. Die Industrieländer sind vielen Teilen der Welt vorraus. Auch wenn die Industrieländer sich entscheiden sollten nicht mehr so viel zu produzieren (evtl. auf Grund des Klimawandels) wird vermutlich immer noch der Rest der Welt nachziehen und Güter benötigen. Zudem wird dies vermutlich nicht in den nächsten ~30 Jahren passieren, wenn überhaupt.

Mcsi world über 15 jahre (seite down ähnlich) median rendite 8.78%, schlechteste 3.16% pro jahr (abhängig davon wann gekauft/verkauft wird). Das wichtigste ist, dass die varianz mit längeren Investmentperioden sinkt und nach 10-15 Jahren die Chance für positive Rendite über 90% liegt und nach 20 Jahren gar bei 100% (auf der Seite zu Minimum investment horizon und Compute clicken). Natürlich sind dies historische Daten und garantieren nichts für die Zukunft, jedoch sind sie trotzdem gute Anhaltspunkte, da der gesamte Markt sich in Zukunft vermutlich auf lange Sicht ähnlich verhalten wird.

Broker

  • Hohe Sicherheit (haben eigentlich alle hier in Deutschland + deutsche Einlagensicherung bis 100.000€)
  • keine Verwahrungsgebüren (ist bei den meisten auch so)
  • geringe Kosten für einmaligen Kauf (gut wenn pauschal, schlecht wenn %)

Es ist schwer Beispiele zu nennen, da die Konditionen der Broker sich andauernd ändern. Generell bieten jedoch die "alten" Banken schlechtere Konditionen. Ein weiterer wichtiger Faktor ist oft, ob die Broker eine gute App und Website anbieten, da viele Banken noch sehr hinterher sind. Am besten kurz immer YouTube Videos angucken, um die Apps in Aktion zu sehen. Man könnte allerdings auch argumentieren, dass es besser ist keine oder keine gute App zu haben, da dies bei vielen Leuten zu Impuls Käufen oder Verkäufen führen kann, da es so einfach ist.

Nachhaltigkeit

  • ESG: Ziel ist immer noch Performance. Es werden Unternehmen ausgeschlossen die durch bestimmte umweltschädlichen, sozialen oder ihr Regime negativ auffallen, und dadurch auch eventuell schlechtere Performance erreichen (so weit ich weiß wurde aber noch keine klare Korrelation mit schlechterer Performance festgestellt).
  • SRI: strenger als ESG, suchen aktiv Unternehmen nach ethischen Richtlinien herraus, verwenden allerdings auch teilweise das ESG-Rating zur auswahl, nur die Grenze ist strenger.

Gute Videos dafür: [1][2] oder in Text Form.

Oder einfach Investopedia.

70/30

Mit dem MSCI World werden nur die Industrieländer abgedeckt. Um noch breiter zu diversifizieren ist es sinnvoll ca. 30% des Portfolios in beispielsweise den MSCI World Emerging Markets (EM), welcher viele Schwellenländer noch mit abdeckt. Alternativ ist es noch möglich etwas Europa dazuzunehmen, wenn die Übergewichtung der USA im MSCI World nicht gefällt.

Hier noch ein paar andere Porfolioarten zum Vergleich.

Mögliche ETFs

MSCI World SRI (70%):

  • Amundi Index MSCI World SRI UCITS ETF DR (WKN: A2JSDA ISIN: LU1861134382)

MSCI World Emerging Markets SRI (30%):

  • iShares MSCI EM SRI UCITS ETF (WKN: A2AFCZ ISIN: IE00BYVJRP78)
  • Amundi Index MSCI Emerging Markets SRI UCITS DR ETF (C) (WKN: A2JSDD ISIN: LU1861138961)

Zum finden ist justETF gut. Einfach einen Index auswählen und nach Kriterien filtern. Hier noch eine Seite für Tips auf welche Dinge bei der Auswahl zu achten ist.

· 11 min read

Google bias

link: https://onezero.medium.com/the-enduring-anti-black-racism-of-google-search-d024924bff77

Bad article

A search engines job should be to get users the information they want. It feels like the baseline for zero bias is what the internet offers. So when the whole internet is nine images of an apple and one image of a banana, it would be good to expect an apple more often when searching for "fruit".

So when there are the tags for "black girls" are overwhelmingly found on porn sites it should be to no surprise that google shows those when searching for "black girls".

It feels like, if google would not intervene in the "societal" distribution of the search results, we would have more racist search results, as one can see at the exact example in the article. So to blame google instead of the culture of the people is wrong. So google actually does bias the results, however one could argue that that's a good thing. The author shouldn't blame google for the few times reality was shining through, but thank google for adjusting some bad baselines in society.

It might be helpful to get some diversification in the workplace to help these things, however those need not necessarily be engineers, as the manual adjustments shouldn't have anything to do with engineering, rather with social studies or ethics.

The whole thing is hard to evaluate since we don't exactly know how google selects the search results, however the alternatives are hard to imagine. Is the implication of the article that google engineers went ahead and weighted porn websites higher when searching for "black girls" instead of "white girls"? What would be the motive behind that?

Some weird quotes

Pornography is a specific type of representation that denotes male power, female powerlessness, and sexual violence.

This feels wrong.

Porn on the internet is an expansion of neoliberal capitalist interests. The web itself has opened up new centers of profit and pushed the boundaries of consumption. Never before have there been so many points for the transmission and consumption of these representations of Black women’s bodies, largely trafficked outside the control and benefit of Black women and girls themselves.

  • Why is an expansion of capitalist interests bad?
  • Isn't that good for a lot of people?
  • What does neoliberalism have to do with it?
  • The assumption that the consumption is "largely" outside the benefit of black woman needs to be justified.
    • black woman that do porn do benefit? If they are exploited there is another question. (more fame, money, like music labels)
    • why only for black woman? And what about men in porn? (earn way less than woman)

Gunn and Lynch Googling (2019)

Chapter 4, page 41-51

Risks of googling

  • anonymity, no accountability of face-to-face information. Not a google issue, internet issue.
  • no way to make sure that information is good, same issue in real life, but internet gives broader view quickly. One needs to check multiple sources, integrate in world view and check for inconsistencies.
  • reductionism
    • reductionism: trust is earned not assumed
    • anti-reductionism: just trust others, assuming they have similar thinking faculties
  • google searches lead to most wanted results, assumed to be right, because many others found it to be right
  • trust if author is trusted, problematic, but not unique to internet
    • collective of authors (wikis)
    • some are automated (currency exchange)

selecting sources

  • more reliable information is shared more, higher in ranking, good
  • sometimes information of influencers does have popularity-because-popular, bad
  • there are often experts on both sides, use institutional markers
  • use of likes, upvotes, titles (must not necessarily be a good marker)
  • advertising can be misleading
  • Wikipedia can be good as everything needs source from expert, but can be outdated due to lag of checkups
  • not all people are able to select "good" sources, most just accept everything google gives them first.

Google in Brain

  • extend brain with chip, access fast amounts of information at speed of thought
  • accelerates effects/issues above

Epistemic Agency

Tugend

Verantwortung Anonymity

On trusting Wikipedia

  • generally trusted
  • not always correct

Wikipedia and the epistemology of testimony (by deborah perron tollefsen)

Introduction

  • studies mainly focus on individual testimony
  • group testimony can't always be understood as just a summation of individual testimony
  • the group itself testifies
  • example Wikipedia

Questions

  • Is Wikipedia a source of testimony?
  • What is the nature of that source?
    • the individuals that make entries
    • a subset of individuals
    • the entity Wikipedia itself
  • How can we asses the trustworthiness of Wikipedia as such an unusual epistemic source?

Are the statements on Wikipedia testimony?

define testimony

  • conservative (Coady 1992)
    • speakers intention to present evidence on a specific matter in the interest of the audience
  • liberal (E. Fricker 1995, Sosa 1991)
    • "tellings in general" with no restriction on the domain
  • Jennifer Lackey (2006)
    • "S testifies that p by making an act of communication a if and only if (in part) in virtue of a’s communicable content, (1) S reasonably intends to convey the information that p, or (2) a is reasonably taken as conveying the information that p."
    • so it is a testimony if the speaker intends to convey information or if the audience takes it as such

Wikipedia as testimony

All would obviously include Wikipedia as testimony.

Assumption: People are trolling, writing false information for fun.

Some definitions of testimony might be broken. Lackey's definition would still include Wikipedia as testimony, as people who read Wikipedia still assume it to be testimony.

Wray: not all entries are testimony, some are jokes, so nothing is testimony.

Doesn't mean nothing is testimony.

Testimony is not only what one believes, otherwise there would be no false testimony.

Moran(2006), Assurance view: Testimony comes with assurance that statement is true. Testifiers have responsibility to be truthful. They are aware that they might be questioned and need to explain themselves if the statement is false.

The same is true on Wikipedia. People can change information, but they know that they can then be called to question by other people that can discuss these changes and change them again.

Even if a troll is sometimes hard to track down and question, the information still is taken to come with assurances.

So none of the definitions of testimony would exclude Wikipedia as testimony.

Group testimony

New Question: Is the source the person that writes the entry or the entity Wikipedia?

When group decides something, it doesn't necessarily follow that all or most of the group, would testify the similarly.

Example:

NAS needed to make statement on long term genetic hazards of radiation exposure. It was a difficult decision, but needed to be made to protect the public from other, more harmful misinformation. Some scientists even refused to sign it, because they thought it was indeterminable. In the end they all signed.

For a group G, speaker S, and utterance x, G utters x if and only if:

  1. There exists a group (G), this group has an illocutionary intention, and x conveys that illocutionary intention.
  2. S believes that he or she knows the illocutionary intention of G and that x conveys this illocutionary intention.
  3. G does not object to S uttering x on its behalf and if G intends for any specific individual(s) to utter x, it intends for S to utter x. S believes that he or she knows this.
  4. 2 and 3 are the reasons S utters x.

Need to add 5th condition.

  1. S utters G in the proper social and normative context.

This is important, as the NAS group would probably not have signed the statements, if it wasn't necessary to keep public trust and safety.

So group testimony (group speech act with conveyed information):

Group G testifies that p by making an act of communication a if and only if:

  1. (in part) in virtue of a’s communicable content G reasonably intends to convey the information that p.
  2. The information that p is conveyed by either (i) a spokesperson S or (ii) a written document.
  3. If (i), G does not object to S’s uttering p on its behalf and if G intends for any specific individual(s) to utter p, it intends for S to utter p and S believes that he or she knows this.
  4. If (i), S utters p for the reasons in 3.
  5. If (ii), G does not object to the way in which p is conveyed in writing.
  6. G conveys the information that p in the right social and normative context.
  7. In conveying the information that p in the right social and normative context, G is taken to have given its assurance that p is true.

Wikipedia entries as group testimony

Traits shared by groups (research teams, governments or corporations)

  • share certain goals
    • clear goals on Wikipedia: natural, balanced, verifiable knowledge to all for free
    • contributors have largely those goals, would be hard to explain otherwise
  • are aware that they share these goals
    • "Wikipedia community", "Wikipedians" are names used, Wikipedia conferences exist
    • there are pages on Wikipedia that explain itself, so its self reflective
  • group decision making process with specific rules
  • group members have special rights and obligations

Articles are testimony of Wikipedia once they have been discussed at length and have been approved by the community, they become featured or good articles.

Until then, they are either individual or group testimony.

The trustworthiness of Wikipedia needs to be monitored in those early stages, while "steadying ones mind", almost like a child.

Trustworthiness of Wikipedia

Anti-reductionism: Trust others, assuming they have similar thinking faculties. (normal conversation) Reductionism: Trust, if there are positive reasons, that the other person is sincere/reliable.

Anti-reductionism

Normal conversation with one person is on topics with not expertise, so anti-reductionism is fine. Generally groups have some kind of specific expertise (governmental, scientific, legal). With Wikipedia its different, because it speaks on a wide range of interests (more like a person on the street).

However the standard trust assumption of anti-reductionism may fail with Wikipedia, if it's treated as a child/unstable.

Reductionism

Scrutinize the speaker/Wikipedia
  • Sum of individuals:
    • check if some or all of the contributors are reliable
    • often short track record of contributors, hard to evaluate
    • mature articles could be closer to the truth than the individual entries of the contributors through the process of discussion and approval
    • might tell us nothing about the trustworthiness of Wikipedia
  • Systematic cues:
    • Programs can figure out anomalies (quick changes without discussion after long stable period, information that doesn't fit into the style of the article)
    • quick correction of spelling/grammatical errors might hide red flags for the content of the entry from the reader; one can still check the history (most probably wont)
    • trust the system not the individuals
Scrutinize the content

Verify with own background knowledge. Integrate in world view and check for inconsistencies. A UFO landed on the school roof (unlikely because of prior believe) Trust the process and the reports, not the individuals. There are incentives for groups to tell the truth(scientific groups, some corporations)

If group testimony is wildly at odds with your own knowledge, one has no reason to trust it.

Wikipedia:

  • incentives are in the structure of the system
  • entries will be checked against background knowledge
  • by challenging Wikipedia, its reliability increases through new policies and procedures

Conclusion

  • Wikipedia involves a mix of individual, group and Wikipedia testimony
  • Can't trust Wikipedia by default, yet (still a child)
  • Will get better once it matures, and doesn't need to be constantly monitored

Discussion Questions

Fake News and Partisan Epistemology

Context Collapse

Hopeful Trust

Pendulum swung too far:

  • Tweets with misinformation are taken as truth because of labels of person (trans, black); Trust gets abused by speaker. It is assumed people trust the person just because of the label. Examples disproportionally damage trust in truthful speakers.

  • vulnerability invites trust, but only sometimes. On social media, one needs to take the average to see effect

    • trump voters meet trans people in real life

· 4 min read

Don't multitask

It just doesn't work, you think it works, but it doesn't. You're just switching between tasks, and you're not doing any of them well. Or you are doing one with 80% of your brain and the other 20%, so the one with 20% isn't even enjoyed, so why not do it with 100% of your brain in your free time.

Social media/ entertainment

Only watch them while eating or in free time. Then you can watch the highlights of the day, and not needing to search for cool stuff while you should be working or doing other things.

Sleep

Keep sleep schedule, wake up early, try 8h.

Exercise

Mix running and at home exercise, depending on weather and state of mind. Don't miss two days in a row. Its easy to lose the habit then.

Eat healthy

Just count your calories, and eat filling foods. Mix it up, change some vegetables, proteins and spices in the recipes, mix up rice with noodles or lentils.

Work

Eliminate distractions. Block websites like YouTube, Twitch, Twitter, etc. Work for selected periods of time, but focused.

Do your bed

Yeah, sounds like the meme daddy Peterson tells you, but it helps, its a small task that's easy to accomplish, and it makes you feel good. It's a good habit to start with.

Shower

Just shower early in morning, makes you feel fresh and ready for the day. And wear clothes that you would wear in public or work. Makes you feel ready.

Walks

Take a walk without any distractions. No phone, just enjoy the nature. It's good for your mind and body. It may sound stupid, but it will make you feel better.

ToDo list

Don't put too many tasks on there, and make them as small as possible. That way, you can actually achieve them, and don't feel bad because you only managed to complete half of them by the end of the day.

Free time

You need some dedicated time to do whatever you want. If not, it will creep into the time you should be working.

Good time to socialize. Meeting friends helps.

Default Schedule

TimeTask
7:00Wake up, Shower, Get ready
7:30Go for a walk
7:50Breakfast
8:15Schedule my day
8:30Work
12:00Do exercise
12:30Lunch
13:30Work
19:00Dinner
19:30Do whatever I want
22:30Sleep

Alternative Schedule

TimeTask
7:00Wake up, Shower, Get ready
7:30Go for a walk
7:50Breakfast
8:15Schedule my day
8:30Work
12:00Do exercise
12:30Lunch
13:30Work
17:00Do whatever I want
22:30Sleep

Rules

  1. Only use social media during food slots
  2. Socialize only after 16:00, if work is done.
  3. Can take two days off each week, if i feel like it.
  4. If I feel healthy and motivated, I can follow the routine every single day, without off days.

Food Plan (Weekly):

DayMeal
MondayTofu, zucchini, bell pepper, soy sauce, ginger stir fry with white rice
TuesdayLentil soup with a side of whole grain crackers/bread
WednesdayQuinoa bowl with roasted mushrooms and brokkoli with lemon juice
ThursdayTofu, zucchini, bell pepper, soy sauce, ginger stir fry with white rice
FridaySpinach and tomato omelet with whole grain toast
SaturdayWrap with hummus, roasted eggplant and arugula
SundayTofu, zucchini, bell pepper, soy sauce, ginger stir fry with white rice

Every day: Spices (pepper, salt, thyme, rosemary, garlic powder)

Shopping List (Wednesday):

Fresh:

Vegetables/Fruits:

  • 3x zucchini
  • 3x bell pepper
  • 3x mushrooms
  • 1x eggplant
  • tomatoes
  • brokkoli
  • fresh spinach
  • arugula
  • 3x ginger

Other:

  • 3x tofu
  • hummus
  • 4x eggs
  • wraps
  • cheese

Bulk:

  • soy sauce
  • quinoa
  • lentils
  • white rice
  • whole grain crackers/bread
  • hummus
  • lemon juice (oil)
  • spices (pepper, salt, thyme, rosemary, garlic powder)
  • vegetable broth powder

· 6 min read

Notes taken from "What is Programming" by George Hotz.

Programs

Input > Program > Output

Seems more like functional programming.

C is like assembly with some syntactic sugar.

Language spectra:

  • Ease of use: C --> Python
  • Functional: C --> Haskell

C --> C++ was functional --> object oriented.

Didn't really improve programmer productivity.

Garbage collection improved programmer productivity.

Computer

  • Processor (CPU) --> Stream of instructions
  • Memory (RAM) --> Instructions + data

Hello World Example

int main() {
printf("hello world\n");
}

Compile with gcc main.c and run with ./a.out. The compilation will give some errors but it will still run. And you can check out the instructions and memory with objdump -D a.out.

Program

  • .text: Instructions
  • bss: Static data
  • stack: local variables (control flow)
  • heap: malloc
void a() {
int variable_on_the_stack;
\\ return by popping off the stack
}

void b() {
}

int main() {
a(); // pushes the return location of the function onto the stack
b();
}

So in this example, the computer starts by executing the main function. It then enters the a function and pushes the return location of the function onto the stack. The a function does whatever it does, in our example, create a variable on the stack. When the function ends, the variable gets popped off, so it does not exist anymore. Then the return location gets popped off to know where to return to, in our case the main function after a.

This is "real" programming.

Programming for work

What does a software "engineer" do?

  • not writing algorithms

In reality they are just translating a (shitty) language aka "business requirements" into "code".

There are a lot of frameworks, like ruby on rails, that do a lot of the work for you (for example a website that enables users to leave their email address). So you don't have to code, you just have to learn some weird syntax.

Ruby on rails, React (or similar) --> Web app CRUD apps <-- Create, Read, Update, Delete

Frontend (View) Database (Model) Backend/Business Logic (Controller)

This whole thing might soon be automated by AI.

  1. Build a CRUD app contracting firm
  2. Record all the inputs of my developers (translators for business requirements --> code)
  3. Train an AI model to translate "business requirements" --> code

So writing these kind of apps, is nothing like writing binary search algorithms or other lower level stuff, which is taught in school. These two things are completely separate.

Hacking

Input --> System --> Output

To gain access to the System you need to know:

  • What input achieves my desired outcome?

Often times you can give a system an input that it does not expect and thus manage to get access to the system. Figure out how to make the function behave how you want.

Pure model

Domain --> Function --> Range y = f(x)

Impure model

Function can output something outside of the range.

Example

Let's say we want to cancel a flight without paying the cancellation fee. We can think of a few of the inputs we have to that system (airline agent can press a button on pc to cancel flight and waive the fee):

  • We can call the agent and ask them
  • We have a huge amount of words to choose from for that conversation
  • We can do it in person
  • We can send an email
  • Or we can do something unexpected, or out of bounds of the "usual" input, like finding personal information about the agent and blackmailing them (not recommended)

This way we could essentially hack the system.

Guide for Software Engineers

High Brow Software Engineering

  1. Understand a complex system
  2. Modify the system to add a new feature
  3. Test and ship the new system

Machine Learning Engineer

  1. Download a paper
  2. Implement the paper
  3. Keep doing this until you are good

Funnels

Funnels are essentially just a series of filters that can be applied to some group of things to get to the desired outcome.

Selling cars

  1. Top of the funnel: Advertise | 10000 people
  2. Middle of the funnel: Test drive | 100 people
  3. Bottom of the funnel: Buy | 5 people

Getting a partner

  1. Send a message | 100 people
  2. Get a response | 30 people
  3. Get a date | 5 people
  4. Lays | 2 person
  5. Partner | 1 person

Getting money

Capitalism.

Buyers and Sellers. Both need to consent.

So we need to convince others to give us money.

How to get 1.000.000$?

  • 1$ from 1.000.000 people
    • online only
  • 1.000$ from 1.000 people
    • A couple phone calls can be spent to close deal
  • 1.000.000$ from 1 person
    • A lot of effort can be spent to close deal

Million Subs on Instagram

Followers and Influencers. Both need to consent.

Convince 1.000.000 others to follow you.

  1. Appealing content
    • "Novelty"
    • "Shock"
    • "Beauty"
    • "Sexuality"
    • "Comedy"
  2. Be famous
    • FOMO <-- Fear of missing something positive
    • "car crash" <-- Fear of missing out on something negative
  3. Dark arts
    • Buy followers
      • Cracked accounts
      • New accounts
    • Make Instagram private
      • Mystery (Whats behind the curtain?)

Wasting time

Existentialism --> You make your own meaning.

Don't fall in other people's funnels. Don't be in skinner boxes. Don't be influenced by advertising.

What to learn

Object level skills, like specific frameworks, or languages, are not that important. They will die out at some point.

Meta level skills, like how to learn, are more important.

Example Data Science

Learning statistics is more important than learning Pytorch. Statistics will always be useful, but Pytorch will be replaced at some point.

Knowledge Tree

Integrate new information into the tree. Build a world model. In the case of not knowing something you are still able to make decent decisions based on interpolation.

The root of the tree might be something like physics, such that every data point that gets included in your tree can be distilled down to the smallest particles known in physics at the time. This enables predictions about unknown data points.

Another tree root, arguably more advanced than physics, is information. This is based on the paradigm from before (Input --> System --> Output). This obviously includes physics as a sub tree.

"There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors."

Leetcode Interviews

Insulting

Just shows if you can grind leetcode not if you are intelligent or a good programmer. Programming challenges with an objective metric and a slight time limit.

· 18 min read

Task

HRI interface comparisons with examples (VR, AR, bio-signal-based)

Comparison VR, AR, Bio-signal-based

Advantage of all of them is that the user can often interact with the robot in a natural way through hand and body gestures. This makes it possible for users without the technical knowledge of controlling the robot traditionally, to control the robot.

Virtual reality(VR)

Virtual reality puts a human into a virtual world to interact with a robot. The human can see the robot and the robot can see the human. The human can interact with the robot by using a controller or by using their hands. One important aspect is ability to get almost instant feedback from the robot motion. This is important for the human to be able to learn how to control the robot. VR headsets can often be uncomfortable to wear for long periods of time. Newer headsets have batteries instead of cable connections, which can be better or worse depending on the use case. VR could technically do the save as AR does, by just recording the world around the human and displaying parts of it in VR. However the technology isn't there yet to perfectly display reality, so there is still clearly a difference. Could pre-render the actions given to the robot, before executing them.

Augmented reality(AR)

Augmented reality enhances the real world around the human with digital information to better interact with a robot. The human can see the robot and the robot can see the human. The human can interact with the robot by using a controller or by using their hands. One difference to VR is the ability to also see and better interact with the real world around the human.

Bio-signal-based

Bio-signal-based devices can be used to control robots. Many different types of bio-signal-based devices exist, such as EEG, EOG, EMG, ECG, ERG, EGG, GSR and EDA.

  • Electroencephalography (EEG): Measures electrical activity of the brain.
  • Electrooculography (EOG): Measures electrical activity of the eye.
  • Electromyography (EMG): Measures electrical activity of the muscles.
  • Electrocardiography (ECG): Measures electrical activity of the heart.
  • Electroretinography (ERG): Measures electrical activity of the retina.
  • Electroglottography (EGG): Measures electrical activity of the vocal cords.
  • Galvanic skin response (GSR)/Electrodermal activity (EDA): Measures electrical activity of the skin.

These devices can be used to control robots in many different ways. For example, a person can control a robot by thinking about moving it, or by moving their eyes to look at different parts of the robot. Bio-signal-based devices can also be used to control robots by measuring the person's heart rate, or by measuring the person's sweat levels.

Some abbreviations

  • ROS: Robot Operating System

General papers

General comparisons

get at least one paper with an example for every interface type (VR, AR, bio-signal-based)

VR

  • https://arxiv.org/pdf/1903.10064.pdf
    • controlling a swarm of robots with VR
    • manipulating the environment in VR, zooming in and out
    • placing walls in the environment to block the robots
    • highlights intuitiveness of VR
    • gestures are intuitive, but need some training
    • visual information from the robots gets sent to pc and dynamically rendered in VR
    • technically human swarm interaction (HSI)
    • summary: VR is used in \cite to control a swarm of robots. The robots are able to navigate and interact with each other on their own. The user can use VR to manipulate the environment, zoom in and out, and place walls in the environment to block or guide the robots. Additionally the robots can be picked up and placed in a new location. Leap Motion is used to identify the users motions. Thus the user can propose future actions or locations in the virtual environment and the robots will try to execute or move to them in the real world. The authors conducted a usability study with 10 participants between the ages 20 and 35 with an engineering background. Is showed that the controls are intuitive and the test missions are accelerated with the help of human intervention. They note however that some of the gestures, specifically the wall placement and the world resizing, need some training to get used to.
  • https://h2r.cs.brown.edu/wp-content/uploads/whitney18.pdf
  • https://cs.brown.edu/people/gdk/pubs/vr_teleop.pdf
  • https://arxiv.org/pdf/1703.01270.pdf
    • control of robot arms in VR
    • VR Control Room
    • highlights collocation capabilities of VR
    • pick, place, assembly, manufacturing tasks
    • summary: In \cite a team of researchers use VR to control a robot arm. The robot has two arms and is equipped with a camera at its "head". The user uses the consumer-grade headset Oculus Rift CV1 and two Razer Hydra hand trackers as controllers. In VR the robot can then be controlled from a control room, which includes the view of the main camera and two optional views from the two robot arms. So the user feels as if they were in the robots head. To test the system, the authors made an expert user pick up and assemble a Lego piece. They compared it to an automated algorithm on the same task and were able to show that the human performed perfect, whereas the algorithm showed some weakness on the assembly. The user reported that the cameras in the robot arms helped with the alignment of the pieces. The teleoperation allows the user to perform actions from a save environment. The paper highlights the ability of VR to utilize consumer-grade hardware.

AR

  • https://www.frontiersin.org/articles/10.3389/frobt.2017.00020/full
    • uses tablet
    • displays information about the robots motion on the tablet
    • one tiltable camera, 1/3 of workspace visible at a time
    • uses the tablet to control the robot
    • 3 interfaces: control with accelerometer of tablet
      • egocentric: user sees the workspace from the robots perspective. Parts of the workspace are not observable due to the lack of field of view and movement of the camera.
      • exocentric: user sees the workspace from a fixed position on the ceiling. Vision under the robot arm is blocked, so some objects can't be interacted with.
      • mobile mixed reality: user sees workspace from tablet in arbitrary position. Can access any location.
    • pretrial (place one box somewhere else) was easier with AR plot over workspace enabled
    • mobile performs best
    • article about it: https://thenewstack.io/smartphone-app-can-control-robots-augmented-reality/
    • summary: AR can be used to enhance the environment. In \cite the authors compare 3 interfaces. One egocentric, with a tiltable camera on the robots head, one exocentric, with the camera on the ceiling looking down, and the proposed method of using a mobile tablet as the camera. All three approaches use the tablets accelerometer to control the robots arms. The main advantage of the proposed method is, that its cameras field of view can reach all places, unlike the other two. The users can see an overlay over the workspace on the tablet screen, where the robots maximum range of motion and potential actions can be projected. When testing the system, users performed better on the pretrial, when having the AR plot enabled. Additionally the mobile reality interface shows better performance than the other two. The main points to take away, are that this approach needs visual markers in the environment, the user and the robot need to be in the same environment for the mobile version and the AR overlay helps the user and the robot interact better.

Bio-signal-based

  • https://link.springer.com/article/10.1007/s10514-020-09916-x

    • earlier work used only EEG: http://groups.csail.mit.edu/drl/wiki/images/e/ec/Correcting_Robot_Mistakes_in_Real_Time_Using_EEG_Signals.pdf
    • Uses EMG(muscle) + EEG(brain) to give swift feedback to robot
    • EMG is used to detect the users intention, EEG is used to detect potential errors the robot or the human makes
    • summary: In the paper \cite the authors used a hybrid of electromyography (EMG) and electroencephalography (EEG) to control a arm with a tool on it. The robot was supposed to hit one of three holes in the wall in front of it with the electric screwdriver in their hand. The user is equipped with electrodes on their head and surface bar electrodes are applied to their forearms. The signals of those devices are processed separately and then used to determine the action of the robot arm. The user observes the robot and its environment directly and tries to move the tool in the robots hand via muscle movements. When the robot or the user themself make a mistake, the users brain reacts a certain way, often unconsciously, which can be detected by the EEG processor. Those signals are then used to stop and then correct the robot. The system was evaluated on 7 participants. The users were untrained, to reduce the hurdle for new users. The correct target was hit in roughly 70% of the trials, when the robot randomly chose. With the help of the correction through the participant, the success rate jumped to 97%. The authors concluded, that the reliability needs to be improved to be able to deploy the system in safety critical situations. Specifically, the neural network that classified the EEG signal into mistake or no-mistake, had only a 54% accuracy. They also highlight that more users would be needed to make the system more robust towards inter-person variations. However, the system shows potential for an effective supervision system.
  • https://www.jmir.org/2019/10/e16194/

    • neuralink whitepaper
    • uses brain signals to control a robot
    • might be interesting, but not used on humans yet
    • don't know if it "counts" as an example
    • mainly describes a way to get information out of the human brain, not however how to interpret it or control a robot.
    • but really important
  • https://static.aminer.org/pdf/PDF/000/329/658/emg_based_human_machine_interface_system.pdf

    • example of using EMG to control a robot
    • really old paper

Comparison

AR is the cheapest of the three, as no special hardware is needed most of the time. VR however has huge upside of remote operation, by emerging the user in the distant environment. Additionally VR can be more intuitive because the user can be "in the skin" of the robot. Bio-signal-based solutions are in the early stages but offer huge potential for swift intuitive interaction with robots.

Example use casesExample devicesease of useunique functionscostfuture potential
VRcontrol robot motion over internet by moving controllers and observing resultsOculus rift, Meta quest pro, smartphonespecial equipment necessary (headset and controllers), often uncomfortable for long periods of time, either battery (limited work time) or cables (limited motion range)teleoperation, see whole environment of the robot from somewhere else; ego perspective and feel of robot (step into skin of robot, more hands on), but strong stable internet connection necessaryexpensive special equipment, getting cheaper when consumer grade equipment can be usedmight become important to remotely help out "almost fully" autonomous systems in difficult situations; need better form factors
ARdisplay important robot information about the robot(range of motion, wear and tear, pre-rendering of action)google glasses, tablet, smartphonereally simpleno special equipment requiredpretty low, no special equipmentintegration into normal glasses, or contact lenses
Bio-signal-basedsignal if robot did right or wrong action directly with ones mind, control of prosthesis via muscle signals(EMG)implants (Neuralink), EEG, EMG, etc.some special equipment needed, sometimes easy to use (wrist bands), sometimes permanent augment (implant)if implemented well, can read the humans mind and make robot smooth extension of humanranges from cheap(wrist bands) to expensive(implants)huge potential to merge with robots and full control of a robot with a humans thoughts

Use cases

  • VR

    • teleoperation
    • swarm operation
    • full birds eye view or different perspective
  • AR

    • display important information about the environment and the robot
  • Bio-signal-based

    • control of robot
    • possibly more complex, and faster controls possible
  • Comparison VR has the special property that it can transport the user into a completely different environment to control a robot through teleoperation. Additionally one can view the environment from any perspective, for example a birds eye view, as in \ref. This can help to gain an overview over the environment and thus control swarms or other robots. AR and bio-signal-based technologies have direct visual contact from the user or through the camera of a handheld device, like a tablet \ref, most of the time. However, AR can enhance the real environment with important information about the workspace and the robot. This can help the user to perform the tasks faster and saver. It is to be noted that technically VR can do the same, by recording the environment with its front camera and displaying the information in the headset, but the user might have a lower field of view compared to AR glasses or a tablet. Bio-signal-based technologies can be used to control the robot directly with ones mind (EEG) or muscles (EMG), like in \ref. The applications are still limited to simple controls of robot arms or the detection of mistakes with the human mind. The main difference to AR and VR is the fact that the reactions can be faster as the thinking about the mistake can be detected unconsciously by the system. The main issue is that the reliability is still low and thus not save to use with big and powerful robots.

Devices

  • VR

    • Meta quest 2
    • smartphone
  • AR

    • google glasses
    • tablet
    • smartphone
  • Bio-signal-based

    • EEG
    • EMG
    • implants (Neuralink)
  • Comparison VR devices are mostly headsets to display the environment with controllers to control the robot and the position of the user. For headsets, the Meta Quest 2/Pro or the Valve Index can be used. For the controllers, Razer Hydra hand trackers or the default VR controllers that come with the headsets are available. The user can also use a smartphone as a headset, but the field of view is limited, the performance might not be enough and the resolution is not as good as with a dedicated headset. For AR, dedicated glasses are still early in the development. However handheld devices like tablets or smartphones can be used as well, as in \ref. Bio-signal-based devices can be wrist bands, that measure muscle contraction, electrodes on the scalp to measure signals from the brain or various other specialized technology. One main difference is that VR and AR devices are bought on the consumer market, which can help with cost and development, whereas bio-signal-based devices aren't often used in everyday live.

Ease of use

  • VR

    • special equipment necessary (headset and controllers), often uncomfortable for long periods of time, either battery (limited work time) or cables (limited motion range)
    • intuitive, ego perspective
  • AR

    • really simple
    • need to control by touchscreen, which is not as intuitive as VR
  • Bio-signal-based

    • some special equipment needed, sometimes easy to use (wrist bands), sometimes permanent augment (implant)
  • comparison

Cost

Table:

technologydevicecostlink
VRMeta Quest 2450$https://www.meta.com/de/en/quest/products/quest-2/
VRValve Index1079$https://store.steampowered.com/valveindex
ARI-pad449$https://www.apple.com/shop/buy-ipad/ipad
ARGalaxy Tab S8200$https://www.samsung.com/us/tablets/galaxy-tab-s8/buy/
ARGoogle Glasses999$https://www.theverge.com/2019/5/20/18632689/google-glass-enterprise-edition-2-augmented-reality-headset-pricing
Bio-signal-basedEEG electrode hat1500$https://shop.openbci.com/collections/frontpage
  • comparison To compare the cost of the different technologies, The prices of the different devices were looked up and summarized in \ref. Note that this is only a fraction of possible devices. The low end Meta Quest 2 in the same price range as the high end I-Pad. But when comparing the more powerful Valve Index, to a more budget tablet, like the Galaxy Tab S8, VR devices are considerably more expensive than a basic AR device. Additionally for most VR headsets, an additional high end PC is necessary to process the visuals. Another alternative for AR are the Google Glasses, which come at a higher price, similar to the VR headsets. Bio-signal-based devices, specifically EEG, are starting at the price of a VR headset. They might however get cheaper if those devices get produced in higher numbers. The prices can get way higher as well, if implants through operations are used. So in general, AR is the cheapest option, as one can simply use a smartphone or a tablet. VR requires some special technology in form of a headset and probably a high end PC. Finally, the bio-signal-based devices come out as most expensive, as they are still early in development.

Problems

The main ways VR and AR can improve from today are general hardware improvements like better batteries,

Future potential

  • VR

    • might become important to remotely help out "almost fully" autonomous systems in difficult situations
    • need better form factors and better hardware:
      • batteries
      • more comfortable
  • AR

    • integration into normal glasses, or contact lenses
    • more powerful hardware, or remote processing
  • Bio-signal-based

    • huge potential to merge with robots and full control of a robot with a humans thoughts
    • more consumer based hardware
    • improved reliability
  • Comparison: VR might be used at some point to have the human help out almost fully autonomous systems by stepping in the perspective of the robot. Or it can be used to fully control robots remotely and remove the need for humans to work in dangerous environments. AR could have a huge jump in usability if it were to be integrated into everyday glasses or even contact lenses. This could enable people without training to use them. If robots are more common in everyday life this might increase the trust in the robots by displaying certain information about the robots future actions in the environment. Bio-signal-based technologies could be used to completely and reliably control robots with human thoughts, which would be a huge step in the field of human-robot interaction. If this technology is achieved, most other control devices might be obsolete. So the biggest potential certainly lies within EEG technologies, as they can enable a direct link between human and robot. However the other two technologies might also play a crucial role in some more niche cases.

Conclusion

  • Summarize the key points and findings of the paper: In summary, it is difficult to compare the three technologies, because they each have their different use cases, as seen in \ref. Additionally, they are never tested against each other, with regard to user feedback. When comparing the use cases, VR shows a clear advantage in teleoperation, AR in merging digital information into the real world environment and bio-signal-based technology can use quick reactions directly from the human brain to mitigate mistakes.

  • Highlight the main contributions of the paper and its impact on the field of HRI interfaces: This paper compares some examples of the three technologies and their use cases. It also extrapolates those comparisons to the whole categories. Hopefully it can give some ideas on the future research directions of the field. Additionally, this is an encouragement to further investigate how to better compare the three technologies to then be able to better predict what technology is worth more efforts. To conclude this report, some recommendations for future research are the following.

  • Discuss future directions for research in HRI interfaces, including VR, AR, and bio-signal-based:

The final achievement would be to have a direct link between human and robot in both directions. Until then, all three technologies will need to be improved gradually. For VR, the ability to wear the headset for a long time and training programs should be the focus. AR might be more useful, if the technology gets integrated better into glasses to not need an extra tablet while working with a robot in the workspace. Bio-signal-based technologies first need to improve their reliability before they can be used in real-world applications. A next step would be to improve the designs behind the devices, so they can be used more for consumer products and accelerate the development.

todo

  • add picture maybe
  • add VR/AR review

· One min read

Some wiki stuff:

Idea

It would be cool to have a somewhat standarised form of arguments or moral systems. This could be in form of an Argument map in a huge tree and implemented on a website or in a program.

So one could create ones own tree of axioms, premisses and conclusions. Those could be shared and argued about. The program could help identifiy contentions between two peoples moral systems so one can instantly focus on the disagreements.

The main issue is the uglieness of human input. Even with a some standard blocks like axioms and other logical forms humans still input their claims differently. So one would need some machine learning to interpret and compare arguments. With the advancements of language models like GTP-3 one may be able to achieve some decent results.

· 5 min read

Preparation

Going Through CS50 for refresh of some basics (Notes).

Sources

Roadmap/Plan
Motivation/Karpathy is a cool dude

Problem description

Find a model or procedure that makes best use of historical data comprised of inputs and outputs in order to skillfully predict outputs given new and unseen inputs in the future. [1]

Problem solution

A model or procedure that automatically creates the most likely approximation of the unknown underlying relationship between inputs and associated outputs in historical data. [1]

How to get there

Define the problem

  • Describe problem informally and formally and list assumptions and similar problems
  • List motivations for solving the problem, the benefits a solution provides and how the solution will be used.
  • Describe how the problem could be solved manually.

Prepare Data

  • Consider what data is available, what data is missing and what data can be removed.
  • Organize your selected data by formatting, cleaning and sampling from it.
  • Transform preprocessed data into features ready for machine learning.

Spot check algorithms

  • create small experiment with different transformations of the dataset and different standard algorithms
  • run every pair a bunch of times and compare mean and variance
  • helps flushing out the problem structure and getting the algorithms on which to focus in the next steps

Improving Results

  • Search through parameter space to find best performing models
  • Ensemble: combine results of multiple models

Present Results

  • Define the context of the problem and the motivation
  • Describe Problem as a question that got answered
  • Concisely describe the solution as an answer to the question
  • Specify limitations of the model, what questions it can't answer and with what probability it can answer questions

Precision and Recall

Let's assume we have a dataset of 10 items and some metric with a threshold | beyond witch our correctly classified items should lie. X is the positive class, o is the negative class. To the right of the threshold the positive class is correctly classified, to the left it is not.

o o o o o x x | x o x

We can then calculate the true positives, false positives, true negatives and false negatives.

Confusion Matrix:

  • True Positives (TP): 2 (Number of positive items correctly classified)
  • False Positives (FP): 2 (Number of positive items incorrectly classified)
  • True Negatives (TN): 5 (Number of negative items correctly classified)
  • False Negatives (FN): 1 (Number of negative items incorrectly classified)

Performance Metrics:

  • Accuracy: (TP + TN) / (TP + TN + FP + FN) = 8/10

    • Rate of correct classifications.
  • Precision: TP / (TP + FP) = 2/4

    • Precision is the rate of correctly predicted positives of all predicted positives. Should be high for detecting spam email. You want to let all important emails through, and it's fine if some spam get's through.
  • Recall: TP / (TP + FN) = 2/3

    • Recall is the rate of correctly predicted positives of all actual positives. Should be high for detecting thiefs. It's important to catch all of them, and fine if you pull out a few normal customers.
  • F1 Score: 2 (Precision Recall) / (Precision + Recall) = 2/3

    • Harmonic mean of precision and recall.
  • Specificity: TN / (TN + FP) = 5/7

    • Rate of correct negative classifications.

Things to look out for

AUC of 1

  • AUC can be interpreted as the probability that the model will rank a random positive example higher than a random negative example, which is good.
  • but AUC of 1 indicates a perfect model, which is likely a bug

Loss increasing

  • Bug
  • Learning rate too high
    • always start with low learning rate to check if everything works
    • then adjust
    • not working if loss function plateaus, or start is in a local minimum

Overview

This should be a high level overview of the field of machine learning. It can help to determine what methods to use for a given problem. In general it's important to know what kind of data there is and what you want to predict. From that you can determine what kind of model, loss function and optimization algorithm to use.

  • Predicting a quantity:

    • Regression
      • Linear Regression
      • Logistic Regression
      • Support Vector Machines
      • Neural Networks
  • Predicting a category:

    • Classification
      • Logistic Regression
      • Support Vector Machines
      • Neural Networks
  • add base formulas for everything

  • but also add implementations for everything

Feature Selection/Engineering

Models

Loss Functions

Optimization Algorithms

  • Compute gradients

Evaluation Metrics

Classification

Accuracy

accuracy=correctly classified examplestotal examplesaccuracy = \frac{correctly\ classified\ examples}{total\ examples}

· 7 min read

L1 Regularization

Penalizing the absolute value of the weights in a model. Compared to the L2 regularization, the weights can now drop to zero and thus can be removed from the model.

Maths

The L1 regularization term is of the form

L1=λi=1nwiL_1 = \lambda \sum_{i=1}^n |w_i|,

where λ\lambda is the regularization parameter, which controls how much regularization there should be, and wiw_i is the ithi\,\text{th} weight.

Implementation

In pytorch we can loop over all the parameters and add their absolute values to the loss function.

loss_reg_l1 = 0
for param in model.parameters():
loss_reg_l1 += torch.sum(torch.abs(param))
total_loss = loss_data + lambda * loss_reg_l1

In sklearn, most models, like the SGDClassifier, have a penalty parameter that can be set to 'l1' to use L1 regularization. And the alpha parameter that controls the lambda.

clf = SGDClassifier(penalty='l1', alpha=0.01)

One-hot Encoding

A way to represent categorical features as binary features.

Example

Let's say we have a dataset with a feature weather that can take on the values sunny, cloudy and rainy. We can one-hot encode this feature as [1, 0, 0] for sunny, [0, 1, 0] for cloudy and [0, 0, 1] for rainy. Thus we created three binary features from one categorical feature.

L2 Regularization

L2 Regularization can be used to punish large weights in a model. Large model weights often indicate more complex models that are more prone to overfitting. Thus overfitting can be reduced by driving all the weights towards zero, but not exactly zero.

Maths

L2 Regularization adds a term to the loss function of the form

L2=λi=1nwi2L_2 = \lambda \sum_{i=1}^n w_i^2,

where λ\lambda is the regularization parameter, which controls how much regularization there should be, and wiw_i is the ithi\,\text{th} weight. We can see that the derivative of the L2 regularization term is 2wi2 w_i, thus the smaller the weight, the smaller the push towards zero by the parameter update. So the weights almost never reach exactly zero (unless floating point stuff).

Implementation

In pytorch, we can use the weight_decay parameter in the optimizer to change the lambda of L2 regularization.

optimizer = torch.optim.Adam(model.parameters(), lr=0.001, weight_decay=0.01)

In sklearn, most models, like the SGDClassifier, have a penalty parameter that can be set to 'l2' to use L2 regularization. And the alpha parameter that controls the lambda.

clf = SGDClassifier(penalty='l2', alpha=0.01)

Sparse Feature

A feature that is mostly zero across all observations and is therefore sparse in the sense that it has few non-zero values. For example, a dataset of people and their favorite songs might have a feature for each song of 100000 songs. However, most people have only listened to a few songs, so most of the feature values would be zero and some ones (one-hot encoding).

Feature Cross

A new feature that is created by combining two or more existing features. This is often used to create non-linearity in a linear model.

Example

So for example, we can have the feature xx and a non-linear relationship to yy. Instead of using a non-linear model, we can create a new feature x2x^2 and use a linear model.

Implementation

In pandas, one can just add another column to the dataframe with the new feature.

df['x_squared'] = df['x'] ** 2

Activation Function

A function that is applied to the output of a layer/neuron in a model. It is mainly used to introduce non-linearity to the otherwise linear model. Popular examples are the sigmoid function, the tanh function and the ReLU function. The ReLU function often works better than the other two smooth functions and is easier to compute. This is mostly based on empirical evidence.

In general, any mathematical function can be used as an activation function. However it is important that the function is differentiable, because we need to compute the derivative of the function for the backpropagation algorithm.

Maths

The sigmoid function is defined as

σ(x)=11+ex\sigma(x) = \frac{1}{1 + e^{-x}}.

The tanh function is defined as

tanh(x)=exexex+ex=e2x1e2x+1\tanh(x) = \frac{e^x - e^{-x}}{e^x + e^{-x}} = \frac{e^{2x} - 1}{e^{2x} + 1}.

The ReLU function is defined as

ReLU(x)=max(0,x)\text{ReLU}(x) = \max(0, x).

Implementation

In pytorch, we can add the activation functions to the model definition. ( ReLU, Sigmoid, Tanh )

import torch.nn as nn
x = torch.randn(1, 1)
m = nn.ReLU()
m = nn.Sigmoid()
m = nn.Tanh()
y = m(x)

or functional ( ReLU, Sigmoid, Tanh )

import torch.nn.functional as F
x = torch.randn(1, 1)
y = F.relu(x)
y = F.sigmoid(x)
y = F.tanh(x)

In sklearn, we can specify the activation function for each model in the model definition, for example for the MLPClassifier.

clf = MLPClassifier(activation='relu')
clf = MLPClassifier(activation='logistic')
clf = MLPClassifier(activation='tanh')

The logistic activation function is the sigmoid function in this case. The sigmoid function is a special case of the logistic function.

Neural Network

A neural network is a model that consists of multiple layers of neurons. In general, a neural network consists of

  • an input layer, whose dimensions fits the input data (features)
  • one or more hidden layers, with weights/biases as connections and an activation function
  • an output layer, whose dimensions fits the output data (labels)
Implementation

In pytorch, we can define a neural network by subclassing the nn.Module class.

import torch.nn as nn

class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.fc1 = nn.Linear(10, 20)
self.fc2 = nn.Linear(20, 1)
self.relu = nn.ReLU()

def forward(self, x):
x = self.fc1(x)
x = self.relu(x)
x = self.fc2(x)
return x

Vanishing Gradient

The gradient during backpropagation may vanish, i.e. approach zero, in the first few layers of a neural network if it is multiplied by low values in the deeper layers. This makes it hard to train earlier layers. In practice the ReLU activation function helps with this problem as it has a derivative of 1 compared to the sigmoid and tanh activation functions, which have very low derivatives pretty quickly. We need to be careful with ReLU, as it's gradient is zero for negative values, which can lead to dead ReLUs. This is further investigated in this paper and can be fixed with a LeakyReLU, which has a linear function with a really small slope for the negative part of the ReLU, so it "leaks" some gradient.

Dead ReLU

A ReLU neuron is dead if it's output is always zero. This can happen if the weights are initialized in a way that the neuron always outputs a negative value. Or in general, if the ReLU unit outputs a negative value it's gradient is zero and it will never be updated. Thus it may never again output a positive value again and contribute to the model. Lowering the learning rate can keep ReLUs from dying.

Exploding Gradient

The gradient during backpropagation may explode, i.e. approach infinity, in the first few layers of a neural network if it is multiplied by high values in the deeper layers. This can be fixed by clipping the gradient, batch normalization or a lower learning rate.

Dropout

Dropout is a regularization technique that randomly sets some neurons to zero during training. This forces the model to learn a more robust representation of the data and prevents overfitting. During inference, all neurons are used again.

In practice, there will be a probability pp attached to certain neurons, which determines if the neuron will be active or not. We can then vary the probability pp to add more (higher pp) or less (lower pp) regularization.

Implementation

In pytorch, we can add dropout layers to the model definition.

import torch.nn as nn

class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.fc1 = nn.Linear(10, 20)
self.fc2 = nn.Linear(20, 1)
self.relu = nn.ReLU()
self.dropout = nn.Dropout(p=0.5)

def forward(self, x):
x = self.fc1(x)
x = self.relu(x)
x = self.dropout(x)
x = self.fc2(x)
return x

In sklearn we need a custom implementation for a dropout layer.

· One min read

Intuitive understanding

A neural network is pretty much just a function that maps a bunch of inputs to a bunch of outputs. First that function does bad at mapping. By showing a lot of input/output pairs the parameters in the function get adjusted to improve the mapping.

So there are three big parts of a neural network. The architecture of the network, the optimization of the parameters and the amount and quality of the data.

Architecture

  • How many layers?
  • What type of layers?
  • What activation functions?
  • Input and output dimensions?

Optimization

  • What does the loss function look like?
  • Gradient descent?
  • What optimizer?
  • When and how fast to change the parameters?
  • When to stop training?
  • Is there overfitting?

Data

  • How much data is there?
  • Is Data argumentation necessary and/or useful?
  • Can there be too much data?
  • Is there bias in data?

Practical Stuff

Perceptron

The Perceptron is the simplest neural network possible.

Implement small deep learning library from scratch (with numpy)

At some point!! To help with a deeper understanding of backpropagation and the inner workings in general.

· One min read

Destiny notes

  • Website to organize Destiny's arguments in a nice format with logic structure
  • link to segments/proofs

overarching points

  • All the points are supposed to be examples of the application of a system
  • This system is used to generate good outcomes in your live
  • So don't try to copy the outcome of the points, as they are based on Destiny's subjective values and environment
  • Instead try to understand the system and apply it to your own life

  • Act as a sounding board when talking with emotional friend
  • if you have the choice between burning someone to the ground or leaving it neutral, leave it neutral
  • be really careful when comparing people, especially when both are friends
    • e.g. Comparing body parts

AI vs human

  • Website with question
  • need to select real answer, from real and AI generated answer
  • AI generated answer is instructed to sound like human (gpt3 api)