MLops 実験開発環境の整備の必要性

MLops

レベル1だけでもやっとけばええんちゃうか

やること

  • データの前処理と保存
  • 特徴量の抽出と保存
  • 分類器の学習と保存
  • それぞれのパラメータの保存

利点

実験する部分や追加したい機能の切り分けがしやすくなる。

[Read More]

pythonに引数をとらせるArgparseの例

サンプルプログラム

以下公式サイトより引用

import argparse

parser.add_argument("square", type=int,
                    help="display a square of a given number")
parser.add_argument("-v", "--verbose", action="store_true",
                    help="increase output verbosity")
args = parser.parse_args()
answer = args.square**2

解説

parser.add_argument("square", type=int,
                help="display a square of a given number")

引数の名前がsquare

型を指定できる。デフォルトはstr。

前に-がつかない名前は位置引数。

[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]

deeplubcut 動画を対象にした点の位置の予測

点のアノテーションの予測

  • 蝿の腹、マウスの脊椎、指の関節など応用範囲が広い。
  • 動画でできてる。デモがある。
  • 動画の特徴量抽出はResNet, mobileNetなど
    • Mobile Netでできるならエッジコンピューティングが視野に入る
    • ラズパイ+GPUみたいな構成

参考リンク

https://github.com/DeepLabCut/DeepLabCut

[Read More]