This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "calc.hpp" | |
#include <cmath> | |
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
// 定数 | |
static constexpr double kAlpha = 0.01; // 学習率 | |
static constexpr double kEps = 1.0e-12; // 閾値 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************** | |
C++ 行列ライブラリ Eigen のテスト | |
* 様々な定義、宣言、計算方法を試行 | |
* ベクトルの変数は英小文字、行列の変数は英大文字としている | |
DATE AUTHOR VERSION | |
2022.10.20 mk-mode.com 1.00 新規作成 | |
Copyright(C) 2022 mk-mode.com All Rights Reserved. | |
***********************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/local/bin/ruby | |
#********************************************* | |
# Ruby script to compute a logistic regression analysis. | |
# (by extending the matrix class) | |
#********************************************* | |
# | |
require 'matrix' | |
class Matrix | |
ALPHA = 0.01 # 学習率 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "calc.hpp" | |
/* | |
* @brief 単回帰曲線(5次)の計算 | |
* | |
* @param[ref] a (double) | |
* @param[ref] b (double) | |
* @param[ref] c (double) | |
* @param[ref] d (double) | |
* @param[ref] e (double) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/local/bin/ruby | |
#********************************************* | |
# Ruby script to calculate a simple regression curve. | |
# : y = a + b * x + c * x^2 + d * x^3 + e * x^4 + f * x^5 | |
# : 連立方程式を ガウスの消去法(ピボット選択)で解く方法 | |
#********************************************* | |
# | |
class Array | |
def reg_curve_5d(y) | |
# 以下の場合は例外スロー |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************** | |
連立方程式の解法 ( ガウスの消去法(ピボット選択) ) | |
DATE AUTHOR VERSION | |
2021.09.16 mk-mode.com 1.00 新規作成 | |
Copyright(C) 2021 mk-mode.com All Rights Reserved. | |
***********************************************************/ | |
#include <cmath> // for fabs | |
#include <cstdlib> // for EXIT_XXXX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!************************************************************ | |
! Simultaneous equations solving by Gauss-Elimination(Pivot) method | |
! | |
! DATE AUTHOR VERSION | |
! 2022.04.14 mk-mode.com 1.00 新規作成 | |
! | |
! Copyright(C) 2022 mk-mode.com All Rights Reserved. | |
!************************************************************ | |
! | |
module const |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/local/bin/ruby | |
#********************************************* | |
# 連立方程式の解法 ( ガウスの消去法(ピボット選択) ) | |
#********************************************* | |
# | |
class GaussElimination | |
def initialize | |
# 係数 | |
@a = [ | |
[1.0, 2.0, 7.0, 6.0, 6.0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DATE_S="20201226" | |
DATE_E="20210105" | |
# Example-1 | |
for (( dt=$DATE_S ; $dt < $DATE_E ; dt=`date -d "$dt 1 day" '+%Y%m%d'` )) ; do | |
echo $dt | |
done | |
echo "---" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************** | |
IERS の Buttelin A テキストデータから | |
EOP(Polar Motion etc.) テキストファイルを生成 | |
* 予め [こちら](ftp://ftp.iers.org/products/eop/rapid/) か | |
らダウンロードしておいたものを使用する。 | |
(IAU 2000A 章動理論によるデータ | |
finals2000A.all", "finals2000A.daily") | |
* 1日のデータに速報値(区分"I")と確定値がある場合は、確定値 | |
を優先。 | |
* 2ファイルで重複する日付のデータは "finals2000A.daily" を |
NewerOlder