Charles Jekel - jekel.meEngineer. Regression. Optimization.
https://jekel.me
Ellipsoid Non-linear Regression Fitting<p>In one of my previous posts, I demonstrated <a href="https://jekel.me/2021/Non-linear-Ellipsoid-Regression/">how to fit an ellipsoid using least squares</a>. Unfortunately, this method won’t work for many practical problems because the data will not be centered around the origin. For these cases, we will need to formulate a more expensive non-linear regression problem that uses optimization to find the ellipsoid parameters. We will use <a href="https://jax.readthedocs.io/en/latest/jax.numpy.html">jax.numpy</a> as an automatic differentiation code to easily compute derivatives for our custom non-linear regression.</p>
Sat, 04 Dec 2021 06:00:00 +0000
https://jekel.me/2021/A-better-way-to-fit-Ellipsoids/
https://jekel.me/2021/A-better-way-to-fit-Ellipsoids/Least Squares Ellipsoid Fit<p><em>Edit 2021 December 4. In many cases you’ll need to do a non-linear fit to find optimal ellipsoid parameters which I discuss in a newer post as <a href="https://jekel.me/2021/A-better-way-to-fit-Ellipsoids/">a better way to fit ellipsoids</a>.</em></p>
Sun, 20 Sep 2020 15:00:00 +0000
https://jekel.me/2020/Least-Squares-Ellipsoid-Fit/
https://jekel.me/2020/Least-Squares-Ellipsoid-Fit/Better error bars with tolerance intervals<p>There is a general belief that plots with error bars are superior to plots without error bars. Sometimes you’ll see people plotting error bars at +- 1.96 standard deviations, however this isn’t as statistically robust as using a <a href="https://en.wikipedia.org/wiki/Tolerance_interval">tolerance interval</a>. This post will compare error bars from the sample standard deviation to error bars from a tolerance interval. The examples use only 10 replicate data points, reflective of many cases where limited replicate data is available.</p>
Thu, 30 Jan 2020 12:00:00 +0000
https://jekel.me/2020/Better-error-bars-with-tolerance-intervals/
https://jekel.me/2020/Better-error-bars-with-tolerance-intervals/Compare lstsq performance in Python<p><strong>Edit 2019-05-09: The benchmark has been updated to include the latest CuPy syntax for cupy.linalg.lstsq.</strong></p>
Sun, 28 Apr 2019 20:00:00 +0000
https://jekel.me/2019/Compare-lstsq-performance-in-Python/
https://jekel.me/2019/Compare-lstsq-performance-in-Python/Adding TensorFlow support for pwlf<h1 id="edit">Edit</h1>
Mon, 15 Apr 2019 13:00:00 +0000
https://jekel.me/2019/Adding-tensorflow-to-pwlf/
https://jekel.me/2019/Adding-tensorflow-to-pwlf/Attempting to detect the number of important line segments in data<p>There have been a number of people asking how to use <a href="https://github.com/cjekel/piecewise_linear_fit_py">pwlf</a> when you don’t know how many line segments to use. I’ve been recommending the use of a regularization technique which <a href="https://github.com/cjekel/piecewise_linear_fit_py/blob/master/examples/run_opt_to_find_best_number_of_line_segments.py">penalizes the number of line segments</a> (or model complexity). This is problematic in a few ways:</p>
<ul>
<li>It’s an expensive three layer optimization problem (least squares fit, find break point locations, find number of line segments).</li>
<li>The result will be dependant upon the penalty parameter which is problem specific. Something like cross validation could be used to select the parameter, but again this can be expensive.</li>
</ul>
Tue, 12 Mar 2019 11:20:00 +0000
https://jekel.me/2019/detect-number-of-line-segments-in-pwlf/
https://jekel.me/2019/detect-number-of-line-segments-in-pwlf/Using the validate function to compare different FaceNet models in tindetheus<p>This post will compare the results of different pre-trained <a href="https://github.com/davidsandberg/facenet">facenet</a> models when using <a href="https://github.com/cjekel/tindetheus">tindetheus</a> to build a personalized classification model for a single <a href="https://tinder.com">Tinder</a> user. Tindetheus currently states the training accuracy, recall (true positive rate), and specificity (true negative rate) after training. However, it may be more interesting to visualize the trained tindetheus models on an external dataset. The new <em>validate</em> function within tindetheus allows for a user to evaluate the trained tindetheus model on a new image database. This new function will be used to visualize the difference of using different pre-trained facenet models on a small validation dataset. While the training accuracy of the different pre-trained facenet models are subtle, the models predict different faces will be liked on a small validation dataset.</p>
Mon, 03 Dec 2018 17:00:00 +0000
https://jekel.me/2018/Validate-function-in-tindetheus/
https://jekel.me/2018/Validate-function-in-tindetheus/Battery and screen replacement on a LeEco Le Max 2 (x2)<p>I just replaced the battery and screen on my <a href="https://www.gsmarena.com/leeco_le_max_2-8051.php">LeEco Le Max 2</a>, and this post will detail the process. Hopefully it will be helpful for someone who is considering to replace their screen and/or battery.</p>
Tue, 18 Sep 2018 15:00:00 +0000
https://jekel.me/2018/How-to-Replace-battery-on-le-eco-le-max-2-x2/
https://jekel.me/2018/How-to-Replace-battery-on-le-eco-le-max-2-x2/Visual Studio Code Python Setup<p>Visual Studio Code has become my absolute favorite IDE / text editor. I highly recommend those who work with Python to consider using Code. If I were to revisit my <a href="https://github.com/cjekel/Introduction-to-Python-Numerical-Analysis-for-Engineers-and-Scientist">Python course</a>, I would spend a lecture going over setting up Code for working with Python. Microsoft has created a Python extension, which includes linting (a feature that will catch errors and help you follow the PEP 8 style guide). This post will show you how to setup code, why the linting options are useful, and how to run Python scripts from code.</p>
Sun, 29 Jul 2018 14:15:00 +0000
https://jekel.me/2018/Visual-studio-code-Python-setup/
https://jekel.me/2018/Visual-studio-code-Python-setup/512 vs 128 FaceNet embeddings on Tinder dataset<p>In <a href="https://arxiv.org/abs/1803.04347">Classifying Online Dating Profiles on Tinder using FaceNet Facial Embeddings</a> I said that the different <a href="https://github.com/davidsandberg/facenet">facenet</a> models didn’t influence the results by much. Here I’ll show by just how much different facenet models change my overall accuracy.</p>
Tue, 17 Apr 2018 13:35:00 +0000
https://jekel.me/2018/512_vs_128_facenet_embedding_application_in_Tinder_data/
https://jekel.me/2018/512_vs_128_facenet_embedding_application_in_Tinder_data/