Impressions of manga the type of Yankee who gives one-pointed advice to passersby.

This is a story about a yankee who gives a bad impression of being a yankee and gives advice and help to people in need.

The story is about a yankee who takes care of an abandoned cat, and the gap between the two gives him a good impression. But the author’s creative ability to add a twist to it and make it into a system that can be used in each story is amazing.

[Read More]

Personal Feelings about Symptoms of Depression

Feeling depressed

In my case, treatment for depression is going well.

However, I am still far from a full recovery.

In order to reaffirm that I am recovering. To reaffirm that I’m recovering, I’m going to list the symptoms I’ve been having and see how much I’ve improved.

List of symptoms

Mental symptoms

  • Two contradictory sensations prevent me from taking action.
    • Agitation and lethargy
    • Obsessive need to do something and feeling stagnant
  • Feeling of helplessness
  • Stagnation due to inability to think
  • Automatic thinking
    • Having a conversation with someone in your head
    • Sometimes I don’t even make an appearance
    • Thought resources are being allocated
    • A kind of escape from reality?
  • Leaning towards negative thoughts
  • Burning sensation in the brain
  • Self-deprecation
    • A strong sense of shame that you have failed and will be laughed at for all your actions
  • Generalized anxiety
    • Fear of other people, paranoia about being yelled at
  • Black and white thinking, extremes of meaning and meaninglessness
  • Delusions
    • Delusions of being disliked
    • Delusion that your thoughts will be understood by others
    • Delusion that your state of mind or state of being is not understood
  • Fear of wanting the other person to think you are smart and not to be disappointed
    • Fear of being blamed for failure
    • Feeling as if you are terribly at fault when there is a discrepancy in your perception of information
    • Feeling the need to cheat
  • The pain of being conscious and not doing anything is hard
  • Feelings of wanting to die
    • Feeling that life is over
    • Feeling that you are tired of living
  • Not being able to take care of yourself
    • Cannot take a bath
    • Not being able to brush your teeth
    • Loss of appetite or binge eating
    • Feeling like you shouldn’t do things that are good for you (make you feel better or easier)
    • Afraid to go to sleep at night or wake up in the morning
  • Unable to manage money
    • Unable to be conscious in the first place
  • Feeling like you are a stranger
    • Loss of understanding of one’s own feelings
    • A sense of separation between the mind and the will
  • Losing touch with things you used to like, in my case, rejection of guitars
  • A strong sense of rejection of certain places
  • Rejection of moving content such as anime, and difficulty in being moved by it
  • Sense of dependence on others
    • Reload social networking site notifications incessantly
    • Feeling like a so-called “menhera”?
    • Only stopping to send messages in succession.

Physical symptoms

  • Sluggishness in arms and legs
    • Unable to move, sitting on the street, unable to turn over in bed.
    • Inability to act without a strong sense of awareness
  • Loss of appetite for tasty foods
  • Weight gain or loss
  • Physical pain
    • Unexpected chest pain
    • Headache
    • Back pain
    • Discomfort in the throat
  • Insomnia or hypersomnia
    • Waking up in the middle of the night
  • Dizziness
  • Jet lag? Feeling very sick
  • Tooth decay
    • Tooth decay due to skipping brushing?
    • Tooth decay progresses because you don’t visit the dentist regularly
  • Tension
    • Stiff shoulders
    • General body tension
    • Calf tightness
  • Decreased cognitive ability
    • Inability to read letters
    • Inability to hear what others are saying

Efforts to recover from symptoms

  • Visits to the internal medicine department
    • Prescription of psychotropic drugs
    • Prescription of sleeping pills
      • Increased time spent in bed.
      • I slept for almost a month.
  • Visit to a psychosomatic doctor
    • Prescription of psychotropic drugs
    • Prescription of sleep inducing drugs
    • Application for medical treatment for independence support
    • I could feel the change in my symptoms after the change in medication. From that point on, I have been slowly recovering over time.
  • Counseling
    • To be honest, I don’t know how effective it is. I continue to take it because I feel I need it.
  • Supplements
    • No particular effect was seen.
  • Aroma oil
    • No particular effect was seen.
  • Bath
    • Bathing stimulates the body’s senses and provides some distraction.
  • Sauna
    • It became easier to fall asleep after the sauna.
  • Massage
    • Makes it easier to fall asleep.
  • Mindfulness
    • I mainly did body scan meditation. I was able to confirm that I was wasting energy in my body. It also helped me fall asleep.
  • Employment
    • It brought about a change in environment, but it was a very risky move.
  • Regularly hang out with friends
    • In order not to succumb to suicidal thoughts and the feeling that my life was over, I made plans and gave myself a reason to live that long.
    • As a result, I had a lot of experiences.
    • The next thing I knew, I began to feel bored with being able to perform steadily with the same members.
  • Becoming aware of pain and suffering, and creating imaginary friends who comforted me and told me I was okay.
    • The results were very positive. Over the course of a month, the sense of pain really did decrease.
    • On the other hand, I became newly aware of the pain that I had been feeling unconsciously.
    • This will continue to reduce the stress response.
  • For delusions and cognitive distortions, verbalizing these thoughts and feelings and consciously counteracting them
    • Derivative of the above method
    • Combined with written disclosure
    • Imagery to correct bad habits in emotions and perception of reality
    • Guide yourself to a more objective perception of reality
  • Take a walk
    • Does it provide some distraction?
    • I feel a faint sense of entrapment when I stay in my room, so I take walks more often.
  • Creating a support app to make a habit of the behavior that may help improve symptoms.
    • I made the app myself.
    • Creating the app itself did not improve my symptoms.
    • Also, I don’t feel that using the app has led to any improvement in my symptoms.
    • On the other hand, I was able to recognize that my strong desire to escape the pain was strong enough to accomplish the creation of an app that I had no experience with.
  • Writing a diary
    • I used voice input to talk for 10 minutes.
    • It helps me recognize my thoughts and the things that have been lingering in the corner of my mind.
    • I can also see how my symptoms have been changing from past sentences.
    • I can check the severity of my symptoms from the progress of my writing.
    • What is my current condition? Is it good or bad? I didn’t even know that, so it was an important indicator for me to see how I was doing.
  • Drawing illustrations
    • I’m not a painter by nature, but it was a good distraction.
  • Go to a sports club
    • I heard that exercise is good for your physical and mental health, so I tried it.
    • Nervous about working with unfamiliar people
    • But I feel a little refreshed as I try my best to exercise.
  • Read a book
    • Rehabilitation for not being able to read anymore
    • Also, I heard that in the UK they give books as a prescription for depression?
    • I started with one line a day.
    • It’s still hard for me to read.
    • I think I read 3 or 4 books a month even though it’s hard for me.
  • Exposure to moving content such as anime and movies
    • Crying
    • Rehabilitation of the mind
    • I felt that my emotions were fixed, so I imagined moving them.
    • But it’s really like rehabilitation, and it’s painful.
  • Finding a girlfriend
    • Not very effective.
    • I don’t know if it’s because I’m not ready to enjoy love or if it’s because of my health condition.
  • Attending a session
    • I didn’t enjoy it that much. Hardship comes first.

Examples of failure

  • Suicidal thoughts turned into a doomed desire and I went to fall for a scam.
    • I ended up in financial debt. Now I’m on track to pay it back.
  • I got a job even though I am in a condition where I cannot move well.
    • I went there to avoid a change in environment and financial difficulties. I was desperate even then, but it was a reckless act. We believe that there were ways to recover from the disease sufficiently and to utilize employment support.
  • When I was transferred to the hospital, I failed to apply for medical care for independence support.
    • It was hard for me to submit an application for medical care for services and supports for persons with disabilities, which resulted in high medical expenses.
    • I ended up using the medical care for independence support.

Summary of what helped me improve my symptoms

In the end, going to a psychosomatic medicine clinic, doing nothing but resting my mind and taking my time seemed to be the most effective.

[Read More]

Creating data in Natural Language Inference (NLI) format for Sentence transformer

Using the Sentence Transformer to I’m trying to use Sentence Transformer to infer causal relationships between documents.

If we can do this, we can extract the cause and symptoms of the incident from the report.

So, I wondered if NLI could be used for feature learning to extract causal information. I thought.

What is NLI?

Inference of the relationship between two sentences

  • Forward
  • Inverse
  • Unrelated

The three relations are.

Apply to causal relationships

If we apply the three relationships of NLI to causality, the following patterns are possible.

[Read More]

On the use of distributed representations bagging for class classification and generalization performance

After the distributed representation has been obtained, the After the distributed representation is obtained, machine learning can be used to classify it.

Models that can be used include

  • Decision Tree
  • SVM Support Vector Machine
  • NN Neural Networks

and others.

SVM is included in NN in a broad sense.

In this section, we will use the decision tree method.

Bagging

  • Image of majority voting with multiple decision trees
  • Simple theory
    • Decision trees are highly explainable and are a classic machine learning model.
    • Computational load is light compared to deep learning
      • Depends on the size of the model
  • Not much explainability
    • Do we want to analyze each of the multiple decision trees?

``py from sklearn.ensemble import BaggingClassifier from sklearn.tree import DecisionTreeClassifier

[Read More]

How to train a Japanese model with Sentence transformer to get a distributed representation of a sentence

. BERT is a model that can be powerfully applied to natural language processing tasks.

However, it does not do a good job of capturing sentence-wise features.

Some claim that sentence features appear in [ CLS\ ], but This paper](https://arxiv.org/abs/1908.10084) claims that it does not contain that much useful information for the task.

Sentence BERT is a model that extends BERT to be able to obtain features per sentence.

The following are the steps to create Sentence BERT in Japanese.

[Read More]

Using BART (sentence summary model) with hugging face

  • BART is a model for document summarization
  • Derived from the same transformer as BERT
  • Unlike BERT, it has an encoder-decoder structure
    • This is because it is intended for sentence generation

This page shows the steps to run a tutorial on BART.

Procedure

  1. install transformers

Run ``sh pip install transformers

Run summary

2. Run the summary
from transformers import BartTokenizer, BartForConditionalGeneration, BartConfig

model = BartForConditionalGeneration.from_pretrained('facebook/bart-large')
tokenizer = BartTokenizer.from_pretrained('facebook/bart-large')

ARTICLE_TO_SUMMARIZE = "My friends are cool but they eat too many carbs."
inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=1024, return_tensors='pt')

# Generate Summary
summary_ids = model.generate(inputs['input_ids'], num_beams=4, max_length=5, early_stopping=True)
print([tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=False) for g in summary_ids])
```

On 2021/01/18, the output was MyMy friends.

Interesting.

## Where I got stuck.
Error when the version of pytorch is different from the one specified in transformers.

pip install -U torch

[Read More]

Thoughts on manga women who want to cook and women who want to eat

Summary

A story about the interaction between the hero, who enjoys cooking and wants to cook a lot, but can’t consume enough on his own, and the heroine, who eats a lot? This is a story about the interaction between the heroine?

Thoughts

Why do I need to be a woman? This is a story about a woman who wants to cook a lot but can’t consume it all by herself.

[Read More]

Procedure for obtaining a distributed representation of a Japanese sentence using a trained Universal Sentence Encoder

.

A vector of documents can be obtained using Universal Sentence Encoder.

Features

Supports multiple languages.

Japanese is supported.

Can handle Japanese sentences as vectors.

Usage

Clustering, similarity calculation, feature extraction.

Usage

Execute the following command as preparation.

pip install tensorflow tensorflow_hub tensorflow_text numpy   

Trained models are available.

See the python description below for details on how to use it.

import tensorflow_hub as hub  
import tensorflow_text
import numpy as np  
# for avoiding error  
import ssl  
ssl._create_default_https_context = ssl._create_unverified_context  

def cos_sim(v1, v2):  
   return np.dot(v1, v2) / (np.linalg.norm(v1) * np.linalg.norm(v2))  
  
embed = hub.load("https://tfhub.dev/google/universal-sentence-encoder-multilingual/3")  
  
texts = ["I saw a comedy show yesterday." , "There was a comedy show on TV last night." , "I went to the park yesterday." , "I saw a comedy show last night.", "Yesterday, I went to the park."]  
vectors = embed(texts)  
```.

See the following link for more details

[Try Universal Sentence Encoder in Japanese](https://qiita.com/kenta1984/items/9613da23766a2578a27a)


### Postscript
```py
import tensorflow_text

Without this line, you will get an error like ``Sentencepiece not found! error. This line is not explicitly used in the sample source, but is required for the actual execution. This line is not explicitly used in the sample source, but is required in the actual runtime.

[Read More]

Enumerating Applications of Document Classification Problems Only

Applying the Document Classification Problem

You’ve learned about machine learning, but you don’t know how to use it! Isn’t it?

It is easy to overlook this if you don’t pay attention to it when you study it, but if you don’t keep your antennas up, you won’t know how to use it.

If you don’t keep your antennae up, you won’t know how to use it. Since a tool is only a tool if it is used, you should make a note of how you use your newly acquired tool.

[Read More]

A note on how to use BERT learned from Japanese Wikipedia, now available

huggingface has released a Japanese model for BERT.

The Japanese model is included in transformers.

However, I stumbled over a few things before I could get it to actually work in a Mac environment, so I’ll leave a note.

Preliminaries: Installing mecab

The morphological analysis engine, mecab, is required to use BERT’s Japanese model.

The tokenizer will probably ask for mecab.

This time, we will use homebrew to install Mecab and ipadic.

[Read More]