Popup color
Arbitrage Alert Percentage
What percentage of arbitrage opportunity would you like to be alerted for?
Audio file for Arbitrage sound alerts
Coin Selection
What coin would you like to Arbitrage?
Settings configuration
What percentage of arbitrage opportunity would you like to be alerted for?
What coin would you like to Arbitrage?


Mitchell Underwood
About
Portfolio
Contact
Portfolio
Party Planner
Live
Repo
Weather App
Live
Repo
Password Generator
Live
Repo
Parent Connect
Live
Repo
Code Quiz
Live
Repo
Eat-Da-Burger!
Live
Repo


Publications
Journal Publications (since 2012)
-
Zhenyu Guan*, Qunliang Xing*, Mai Xu, Ren Yang, Tie Liu and Zulin Wang, "MFQE 2.0: A New Approach for Multi-frame Quality Enhancement on Compressed Video" in IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI 2019), DOI: 10.1109/TPAMI.2019.2944806.
|
Paper
|
Code
|
-
Tianyi Li, Mai Xu, Ce Zhu, Ren Yang, Zulin Wang and Zhenyu Guan, "A Deep Learning Approach for Multi-Frame In-Loop Filter of HEVC," in IEEE Transactions on Image Processing, 2019.
|
Download PDF |
Download Database |
-
Mai Xu, Chen Li, Zhenzhong Chen, Zulin Wang and Zhenyu Guan, "Assessing Visual Quality of Omnidirectional Videos," in IEEE Transactions on Circuits and Systems for Video Technology (2018).
|
Download PDF
|
Download Database
|
Download Code
|
-
Ren Yang, Mai Xu, Zulin Wang, Yiping Duan, and Xiaoming Tao. "Saliency-guided complexity control for hevc decoding." IEEE Transactions on Broadcasting (2018).
|
Download PDF
|
-
Mai Xu*; Yufan Liu; Haoji Hu; Feng He, Find who to look at: Turning from action to saliency, IEEE Transactions on Image Processing, 27 (9), 2018. (SCI, Q1)
-
Ren Yang, Mai Xu, Zulin Wang, Yiping Duan, and Xiaoming Tao. "Saliency-guided complexity control for hevc decoding." IEEE Transactions on Broadcasting (2018).
|
Download PDF
|
-
Mai Xu*; Tianyi Li; Zulin Wang; Xin Deng; Ren Yang; Zhenyu Guan, Reducing Complexity of HEVC: A Deep Learning Approach, IEEE Transactions on Image Processing, 2018.
|
Download PDF
|
Download Database
|
Download Code
|
-
Mai Xu*, Yun Ren, Jinxian Liu and Zulin Wang, Saliency detection in face videos: A data-driven approach, IEEE Transactions on Multimedia, 2018.
-
Mai Xu; Yuhang Song; Jianyi Wang; Minglang Qiao; Liangyu Huo; Zulin Wang, Modeling Attention in Panoramic Video: A Deep Reinforcement Learning Approach, IEEE Transactions on Pattern Analysis and Machine Intelligence, 2018.
-
Liu Y, Yang L, Xu M, et al. Rate control schemes for panoramic video coding[J]. Journal of Visual Communication and Image Representation, 2018, 53: 76-85.
-
Shengxi Li, Mai Xu, Yun Ren, and Zulin Wang. "Closed-form optimization on saliency-guided image compression for HEVC-MSP." IEEE Transactions on Multimedia (2017).
|
Download PDF
|
Download Database
|
-
Shengxi Li, Mai Xu, Zulin Wang, and Xiaoyan Sun. "Optimal bit allocation for CTU level rate control in HEVC." IEEE Transactions on Circuits and Systems for Video Technology 27, no. 11 (2017): 2409-2424.
|
Download PDF
|
Download Code
|
-
Jie Ren, Mai Xu*, Wei Chen, Zhiguo Ding and Zulin Wang: Coalition Formation Approaches for Cooperative Networks with SWIPT, IEEE ACCESS, 5, 2017.
-
Baihong Lin, Xiaoming Tao, Mai Xu, Linhao Dong and Jianhua Lu: Bayesian Hyperspectral and Multispectral Image Fusions via Double Matrix Factorization, IEEE Transactions on Geoscience and Remote Sensing, 55(10), 2017.
-
Jingxian Liu, Zulin Wang, Mai Xu*: A Kalman Estimation Based Rao-Blackwellized Particle Filtering for Radar Tracking, IEEE ACCESS, 5, 2017.
-
Yun Ren, Zulin Wang, and Mai Xu. "Learning-Based Saliency Detection of Face Images." IEEE Access 5 (2017): 6502-6514.
|
Download PDF
|
Download Database
|
Download Code
|
-
Mai Xu, Yun Ren, Zulin Wang, Jingxian Liu, and Xiaoming Tao. "Saliency detection in face videos: A data-driven approach." IEEE Transactions on Multimedia (2017).
|
Download PDF
|
Download Database
|
Download Code
|
-
Yanan Wei, Zulin Wang, and Mai Xu. "Road Structure Refined CNN for Road Extraction in Aerial Image." IEEE Geoscience and Remote Sensing Letters 14, no. 5 (2017): 709-713.
|
Download PDF
|
Download Code
|
-
Lai Jiang, Mai Xu, and Zulin Wang. "Predicting Video Saliency with Object-to-Motion CNN and Two-layer Convolutional LSTM." arXiv preprint arXiv:1709.06316 (2017).
|
Download PDF
|
Download Code
|
-
Mai Xu, Lai Jiang, Xiaoyan Sun, Zhaoting Ye, and Zulin Wang. "Learning to detect video saliency with HEVC features." IEEE Transactions on Image Processing 26, no. 1 (2017): 369-385.
|
Download PDF
|
Download Code
|
-
Xin Deng, Mai Xu, and Chen Li. "Hierarchical Complexity Control of HEVC for Live Video Encoding." IEEE Access 4 (2016): 7014-7027.
|
Download PDF
|
-
Xin Deng, Mai Xu, Lai Jiang, Xiaoyan Sun, and Zulin Wang. "Subjective-driven complexity control approach for HEVC." IEEE Transactions on Circuits and Systems for Video Technology 26, no. 1 (2016): 91-106.
|
Download PDF
|
Download Code
|
-
Mai Xu, Lai Jiang, Zhaoting Ye, and Zulin Wang. "Bottom-up saliency detection with sparse representation of learnt texture atoms." Pattern Recognition 60 (2016): 348-360.
|
Download PDF
|
Download Code
|
-
Kanapathippillai Cumanan, Zhiguo Ding, Mai Xu, and H. Vincent Poor. "Secrecy rate optimization for secure multicast communications." IEEE Journal of Selected Topics in Signal Processing 10, no. 8 (2016): 1417-1432.
|
Download PDF
|
-
Zhe Liu, Zulin Wang, and Mai Xu*. Cubature Information SMC-PHD for Multi-Target Tracking. Sensors, 16(5), 2016.
-
Jingxian Li, Zulin Wang, and Mai Xu*. A novel distributed fusion algorithm for multi-sensor nonlinear tracking. EURASIP Journal on Advances in Signal Processing, 62, 2016.
-
Mai Xu*, Haoyu Dong, Chen Chen and Ling Li: Unsupervised Dictionary Learning with Fisher Discriminant for Clustering, 194, Neurocomputing, 2016.
-
Mai Xu* and Zulin Wang: A Novel Double-Layer Sparse Representation Approach for Unsupervised Dictionary Learning, Computer Vision and Image Understanding, 143, 2016.
-
Cheng Zhu, Kanapathippillai Cumanan, Mai Xu, and Zhiguo Ding, Robust secrecy rate optimisations for multiuser multiple-input-single-output channel with device-to-device communications, IET Communications, 9(3), 2015.
-
Shengxi Li, Mai Xu, Xin Deng, and Zulin Wang. "Weight-based R-λ rate control for perceptual HEVC coding on conversational videos." Signal Processing: Image Communication 38 (2015): 127-140.
|
Download PDF
|
Download Code
|
-
Mai Xu, Xin Deng, Shengxi Li, and Zulin Wang. "Region-of-interest based conversational HEVC coding with hierarchical perception model of face." IEEE Journal of Selected Topics in Signal Processing 8, no. 3 (2014): 475-489.
|
Download PDF
|
-
Mai Xu, Shengxi Li, Jianhua Lu, and Wenwu Zhu. "Compressibility constrained sparse representation with learnt dictionary for low bit-rate image compression." IEEE Transactions on Circuits and Systems for Video Technology 24, no. 10 (2014): 1743-1757.
|
Download PDF
|
-
Yipeng Sun, Mai Xu, Xiaoming Tao and Jianhua Lu: Online Dictionary Learning based Intra-Frame Video Coding via Sparse Representation, Wireless Personal Communications, 74(4), 2014. (invited paper)
-
Mai Xu and Jianhua Lu: RANSAC for the Robust Estimation of 3D Reconstruction, IET Computer Vision, 6(4), 2012.
-
Zhiguo Ding, Mai Xu, Bayan Sharif and Jianhua Lu: A General Transmission Scheme for Bi-directional Communication by Using Eigenmode Sharing, IEEE Journal on Selected Areas in Communications (JASC), 30(8), 2012.
-
Zhiguo Ding, Mai Xu, Jianhua Lu and Fei Liu: Improving Wireless Security for Bi-directional Communication Scenarios, IEEE Transactions on Vehicular Technology, 2012.
-
Zhao Chen, Liuguo Yin, Mai Xu and Jianhua Lu: Layered Multimedia Broadcast using Rateless Codes with Progressive Recovery over Cooperative MIMO, EURASIP Journal on Wireless Communications and Networking, 2012.
-
Zhiguo Ding, Mai Xu, Bayan Sharif, and Jianhua Lu. "A general transmission scheme for bi-directional communication by using eigenmode sharing." IEEE Journal on Selected Areas in Communications 30, no. 8 (2012): 1477-1488.
|
Download PDF
|
Conference Publications (since 2012)
-
Tianyi Li, Mai Xu, Ren Yang and Xiaoming Tao, "A DenseNet Based Approach for Multi-Frame In-Loop Filter in HEVC," in Data Compression Conference (DCC), 2019.
|
Download PDF |
Download Database |
-
Yuhang Song*, Jianyi Wang*, Thomas Lukasiewicz, Zhenghua Xu and Mai Xu. "Diversity-Driven Extensible Hierarchical Reinforcement Learning." In Proceedings of the 33rd National Conference on Artificial Intelligence, AAAI 2019. (Oral presentation)
|
Download PDF
|
Download Code
|
Oral Presentation
|
-
Chen Li, Mai Xu, Xinzhe Du, and Zulin Wang. "Bridge the Gap Between VQA and Human Behavior on Omnidirectional Video: A Large-Scale Dataset and a Deep Learning Model." In Proceedings of the 26th ACM International Conference on Multimedia, 2018.
|
Download PDF
|
Download Database
|
Download Poster
|
-
Yang, Ren, Mai Xu, Zulin Wang, and Tianyi Li. "Multi-Frame Quality Enhancement for Compressed Video." In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018.
|
Download PDF
|
-
Juan Wang, Xiaoming Tao, Mai Xu, Jianhua Lu: Boundary Objectness Network for Object Detection and Localization，the Proceeding of IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2018.
-
Yufan Liu, Songyang Zhang, Mai Xu, and Xuming He. "Predicting salient face in multipleface videos." In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4420-4428. 2017
|
Download PDF
|
Download Database
|
-
Mai Xu, Chen Li, Yufan Liu, Xin Deng, and Jiaxin Lu. "A subjective visual quality assessment method of panoramic videos." In 2017 IEEE International Conference on Multimedia and Expo (ICME), pp. 517-522. IEEE, 2017.
|
Download PDF
|
Download Database
|
Download Code
|
-
Tianyi Li, Mai Xu, and Xin Deng. "A deep convolutional neural network approach for complexity reduction on intra-mode HEVC." In 2017 IEEE International Conference on Multimedia and Expo (ICME), pp. 1255-1260. IEEE, 2017.
|
Download PDF
|
Download Database
|
-
Yuhang Song, Mai Xu*, Yun Ren, and Shengxi Li,: Watching Videos with Certain and Constant Quality: PID-based Quality Control Method, the Proceeding of IEEE Data Compression Conference (DCC), 2017.
-
Yufan Liu, Mai Xu, Chen Li, Shengxi Li and Zulin Wang. ""A novel rate control scheme for panoramic video coding."" In 2017 IEEE International Conference on Multimedia and Expo (ICME), pp. 691-696. IEEE, 2017.
|
Download PDF
|
-
Ren Yang, Mai Xu, and Zulin Wang. "Decoder-side HEVC quality enhancement with scalable convolutional neural network." In 2017 IEEE International Conference on Multimedia and Expo (ICME), pp. 817-822. IEEE, 2017.
|
Download PDF
|
Download Code
|
-
Yun Ren, Zulin Wang, Mai Xu, Haoyu Dong, and Shengxi Li. "Learning Dynamic GMM for Attention Distribution on Single-face Videos." In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 29-38. 2017.
|
Download PDF
|
Download Database
|
Download Code
|
-
Yanan Wei, Zulin Wang, Mai Xu, and Shuhao Qiao. "An LSTM Method for Predicting CU Splitting in H.264 to HEVC Transcoding." In IEEE Visual Communication and Image Processing Conference(2017).
|
Download PDF
|
-
Xin Deng, and Mai Xu. "Complexity control of HEVC for video conferencing." In 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 1552-1556. IEEE, 2017.
|
Download PDF
|
-
Shengxi Li, Mai Xu, Yun Ren, Chengzhang Ma, and Zulin Wang. "Optimizing subjective quality in hevc-msp: An approximate closed-form image compression approach." In Data Compression Conference (DCC), 2016, pp. 437-446. IEEE, 2016.
|
Download PDF
|
Download Database
|
-
Ren Yang, Mai Xu, Lai Jiang, and Zulin Wang. "Subjective-quality-optimized complexity control for HEVC decoding." In 2016 IEEE International Conference on Multimedia and Expo (ICME), pp. 1-6. IEEE, 2016.
|
Download PDF
|
-
Jiaxin Lu, Mai Xu, and Zulin Wang. "Predicting the memorability of natural-scene images." In Visual Communications and Image Processing (VCIP), 2016, pp. 1-4. IEEE, 2016.
|
Download PDF
|
Download Database
|
-
Danlan Huang, Xiaoming Tao, Mai Xu, Shenghua Gao and Jianhua Lu: Image Compression via Multiple Geometric Dictionaries， the Proceeding of IEEE Global Conference on Signal and Information Processing (GlobalSIP), 2016.
-
Jingxian Liu, Mai Xu* and Zulin Wang: A Nonlinear and Non-Gaussian Distributed Fusion Based on Rao-Blackwellized Particle Filtering, the Proceeding of Wireless Communications and Signal Processing (WCSP), 2016.
-
Kanapathippillai Cumanan, Zhiguo Ding, Mai Xu and H. Vincent Poor: Secure Multicast Communications with Private Jammers, the Proceeding of IEEE International Workshop on Signal Processing Advances in Wireless Communications (SPAWC), 2016.
-
Mai Xu, Yun Ren, and Zulin Wang. "Learning to predict saliency on face images." In Proceedings of the IEEE International Conference on Computer Vision, pp. 3907-3915. 2015.
|
Download PDF
|
Download Database
|
Download Code
|
-
Lai Jiang, Mai Xu, Zhaoting Ye, and Zulin Wang. "Image saliency detection with sparse representation of learnt texture atoms." In Proceedings of the IEEE International Conference on Computer Vision Workshops, pp. 54-62. 2015.
|
Download PDF
|
Download Code
|
-
Shengxi Li, Mai Xu, and Zulin Wang. "A novel method on optimal bit allocation at LCU level for rate control in HEVC." In 2015 IEEE International Conference on Multimedia and Expo (ICME), pp. 1-6. IEEE, 2015.
|
Download PDF
|
-
Yun Ren, Mai Xu, Ruihan Pan, and Zulin Wang. "Learning Gaussian mixture model for saliency detection on face images." In 2015 IEEE International Conference on Multimedia and Expo (ICME), pp. 1-6. IEEE, 2015.
|
Download PDF
|
-
Yufan Liu, Haoji Hu, and Mai Xu. "Subjective rate-distortion optimization in HEVC with perceptual model of multiple faces." In 2015 Visual Communications and Image Processing (VCIP), pp. 1-4. IEEE, 2015.
|
Download PDF
|
-
Yilin Liang, Mai Xu, Jie Ren and Zulin Wang: Learning to Segment Videos in HEVC Compressed Domain, the Proceeding of Wireless Communications and Signal Processing (WCSP), 2015.
-
Zhe Liu, Zulin Wang, Mai Xu, Lan Yang and Jingxian Liu: A novel CIF-based SMC-PHD approach for tracking multiple nonlinear targets, the Proceeding of IEEE Radar Conference (RadarCon), 2015.
-
Mai Xu, Yilin Liang and Zulin Wang: State-of-the-art Video Coding Approaches: A Survey, the Proceeding of IEEE International Conference on Cognitive Informatics & Cognitive Computing (IEEE ICCI*CC15), 2015.
-
Yue Cui, Zulin Wang and Mai Xu: A Kinect Based Immersive Video Conferencing System, the Proceeding of IEEE International Conference on Cognitive Informatics & Cognitive Computing (IEEE ICCI*CC15), 2015.
-
Shengxi Li, Mai Xu, Xin Deng, and Zulin Wang. "A novel weight-based URQ scheme for perceptual video coding of conversational video in HEVC." In 2014 IEEE International Conference on Multimedia and Expo (ICME), pp. 1-6. IEEE, 2014.
|
Download PDF
|
-
Xin Deng, Mai Xu, Shengxi Li, and Zulin Wang. "Complexity control of HEVC based on region-of-interest attention model." In 2014 IEEE Visual Communications and Image Processing Conference, pp. 225-228. IEEE, 2014.
|
Download PDF
|
-
Wei Chen, Mai Xu, Yue Tao, Zhiguo Ding, and Zulin Wang. "Distributed coalition formation algorithms for cooperative broadcast networks with SWIPT." In 2014 Sixth International Conference on Wireless Communications and Signal Processing (WCSP), pp. 1-5. IEEE, 2014.
|
Download PDF
|
-
Wei Chen, Mai Xu, Zhiguo Ding, and Zulin Wang: Distributed Coalition Formation Algorithms for Cooperative Broadcast Networks with SWIPT, the Proceeding of Wireless Communications and Signal Processing (WCSP), 2014. (Best paper award)
-
Mai Xu, Jingze Zhang, Yuan Ma, and Zulin Wang: A Novel Objective Quality Assessment Method for Perceptual Video Coding in Conversational Scenarios, the Proceeding of Visual Communications and Image Processing (VCIP), 2014.
-
Zhe Liu, Mai Xu, and Zulin Wang: A modified MCMC approach for classifying target and decoy, the Proceeding of International Conference on Advanced Computational Intelligence (ICCAI), 2013.
-
Mai Xu and Jianhua Lu: Sparse Representation of Texture Patches for Low Bit-rate Image Compression, the Proceeding of Visual Communications and Image Processing (VCIP), 2012.
-
Yipeng Sun, Mai Xu, Xiaoming Tao and Jianhua Lu: Online Dictionary Learning Based Intra-Frame Video Coding Via Sparse Representation, the Proceeding of Wireless Personal Multimedia Communications Symposium (WPMC), 2012. (Best Paper Award)
-
Zhao Chen, Liuguo Yin, Mai Xu and Jianhua Lu: Rateless Codes with Progressive Recovery for Layered Multimedia Delivery, the Proceeding of Vehicular Technology Conference (VTC-fall), 2012.


Here you can import a JSON-serialized file to target configuration node.
If there are overlays between existing and imported configuration nodes (recursively), the system will prompt you to confirm
overwriting.
In this case you can either accept it, or deny and edit JSON file manually before next import attempt.
! Please do not close the window before upload is complete !


229. Reserved Key Values
Up: Establishing Communication
Next: Client/Server Examples
Previous: Name Publishing
The following key values are reserved. An implementation is not required to
interpret these key values, but if it does interpret the key value, it
must provide the functionality described.
-
ip_port
-
Value contains IP port number at which to
establish a port. (Reserved for MPI_OPEN_PORT
only).
-
ip_address
-
Value contains IP address at which to
establish a port. If the address is not a valid IP address of
the host on which the MPI_OPEN_PORT call is made,
the results are undefined. (Reserved for MPI_OPEN_PORT
only).
Up: Establishing Communication
Next: Client/Server Examples
Previous: Name Publishing
Return to MPI-3.1 Standard Index
Return to MPI Forum Home Page
(Unofficial) MPI-3.1 of June 4, 2015
HTML Generated on June 4, 2015


lmmin - Levenberg-Marquardt least-squares minimization
#include <lmmin.h>
void lmmin( int n_par, double *par, int m_dat, const void *data, void (*evaluate)( const double *par, int m_dat, const void *data, double *fvec, int *info ), void (*printout)( int n_par, const double *par, int m_dat, const void *data, double *fvec, const lm_princon_struct *princon, int iflag, int iter, int nfev ), const lm_control_struct *control, const lm_princon_struct *princon, lm_status_struct *status );
void lm_printout_std( int n_par, const double *par, int m_dat, const void *data, double *fvec, const lm_princon_struct *princon, int iflag, int iter, int nfev );
extern const lm_control_struct lm_control_double;
extern const lm_control_struct lm_control_float;
extern const lm_princon_struct lm_princon_std;
extern const char *lm_infmsg[];
extern const char *lm_shortmsg[];
lmmin() determines a vector par that minimizes the sum of squared elements of a vector fvec that is computed by a user-supplied function evaluate(). On success, par represents a local minimum, not necessarily a global one; it may depend on its starting value.
For applications in curve fitting, the wrapper function lmcurve(3) offers a simplified API.
The Levenberg-Marquardt minimization starts with a steepest-descent exploration of the parameter space, and achieves rapid convergence by crossing over into the Newton-Gauss method. For more background, see Moré 1978, Madsen et al. 2004, and comments in the source code.
Function arguments:
Number of free variables. Dimension of parameter vector par.
Parameter vector. On input, it must contain a reasonable guess; on output, it contains the solution found to minimize ||fvec||.
Dimension of vector fvec. Must statisfy n_par <= m_dat.
This pointer is ignored by the fit algorithm, except for appearing as an argument in all calls to the user-supplied routines evaluate and printout.
Pointer to a user-supplied function that computes m_dat elements of vector fvec for a given parameter vector par. If evaluate return with *info set to a negative value, lmmin() will interrupt the fitting and terminate.
A function that prints messages about the fit progress. Legitimate values of this pointer argument are NULL (to indicate that no messages are wanted), &lm_printout_std (pointer to a default implementation), or a pointer to a user-supplied function.
Parameter collection for tuning the fit procedure. In most cases, the default &lm_control_double is adequate. If f is only computed with single-precision accuracy, &lm_control_float should be used. See also below, NOTES on initializing parameter records.
control has the following members (for more details, see the source file lmstruct.h):
Relative error desired in the sum of squares; recommended setting: somewhat above machine precision; less if fvec is computed with reduced accuracy.
Relative error between last two approximations; recommended setting: as ftol.
A measure for degeneracy; recommended setting: as ftol.
Step used to calculate the Jacobian; recommended setting: as ftol, but definitely less than the accuracy of fvec.
Initial bound to steps in the outer loop, generally between 0.01 and 100; recommended value is 100.
Used to set the maximum number of function evaluations to patience*n_par.
Logical switch (0 or 1). If 1, then scale parameters to their initial value. This is the recommended setting.
Logical switch (0 or 1). If 1, then use pivots in matrix operations. This is the recommended setting.
Parameter collection for tuning the default printout function &lm_printout_std (user-supplied printout functions are free to use this record or not). For values NULL or &lm_princon_def, the fit is silent. See also below, NOTES on initializing parameter records.
princon has the following members:
Pointer to the stream the output shall be writen to. Typically &stdout or &stderr.
To select one out of several forms. In lm_princon_def, form=0 yields verbose output, form=1 yields one compact line per call.
OR'ed bit values to print (1) status, (2) parameters and norm, (4) residues at end of fit, (8) residues at every step;
-1, or maximum number of parameters to print.
-1, or maximum number of residuals to print.
A record used to return information about the minimization process:
Norm of the vector fvec;
Actual number of iterations;
Status of minimization; for the corresponding text message, print lm_infmsg[status.info]; for a short code, print lm_shortmsg[status.info].
The parameter records control and princon should always be initialized from supplied default records:
lm_control_struct control = lm_control_double; /* or _float */ lm_princon_struct princon = lm_princon_std;
After this, parameters may be overwritten:
control.patience = 500; /* allow more iterations */ princon.flags = 15; /* require most verbose monitoring */
An application written this way is guaranteed to work even if new parameters are added to control or princon.
Conversely, addition of parameters is not considered an API change; it may happen without increment of the major version number.
See directory demo/ in the source distribution.
See application sample demo/curve1.c.
See application sample demo/surface1.c.
Several application samples are provided; they also serve as test suite to ascertain that the fit algorithm overcomes well-known numerical problems:
demo/morobropro.c: m=3, n=2, modified Rosenbrock problem, testing robustness for widely different vectorial components.
demo/powell.c: m=2, n=2, Powell 1970, with singular Jacobian at the solution par=0.
demo/hat.c: m=2, n=1, asymetric mexican hat function ||F(p)||. Fit result depends on starting value - lmfit does not strive to overcome the limitation to local optimisation.
The first public release was 2.0 (December 2004). The API has changed with version 3.0 (March 2010), and again with version 4.0 (July 2013).
Copyright (C): 1980-1999 University of Chicago 2004-2013 Joachim Wuttke, Forschungszentrum Juelich GmbH
Software: FreeBSD License
Documentation: Creative Commons Attribution Share Alike
Homepage: http://apps.jcns.fz-juelich.de/lmfit
Please report bugs to the author <j.wuttke@fz-juelich.de>


class: center, middle ### W4995 Applied Machine Learning # Boosting, Stacking, Calibration 02/21/18 Andreas C. Müller ??? We'll continue tree-based models, talking about boosting. Another ensemble technique called stacking. Finally, a technique called calibration that looks somewhat similar to ensembles but has the goal of obtaining good probability estimates from any classifier. FIXME: XGBOOST!! FIXME early stopping FIXME GBRT: better explain log-loss FIXME: add example of calibrated and inaccurate vs accurate but not calibrated! FIXME: calibration: what are the estimators fit to, and why does fitting it to 0 and 1 create probabilities in between Partial dependence plot. how is that different from feature importances. calibration curve plotting: bins are different for hist and calibration curve? slide 27: maybe put probabilities on x axis? calibration curve: blue histogram is number of total points, y axis not labeled --- class: centre,middle # Gradient Boosting ??? Gradient boosting is one of the most successfull supervised machine learning methods in practice. It's often used in kaggle to win competition, it's used for credit scoring, it's one of the standard tools of the trade. It's one of the best of-the-shelf models A standard implementation that people use is XGBoost, but there's also an implementation in scikit-learn, and we'll talk about both of them. Last time we talked about Random forests, which builds many trees independently, each randomized in a different way, and then averages their predictions. Gradient boosting on the other hand builds trees one by one in a sequential manner, with each tree requiring the results of previous trees. Often, Gradient boosting is done with very small trees, or even decision stumps, which is trees of depth one, so a single split. --- class: center, middle # Boosting (in General) ??? - “Meta-algorithm” to create strong learners from weak learners. - AdaBoost, GentleBoost, … - Trees or stumps work best - Gradient Boosting often the best of the bunch - Many specialized algorithms (ranking etc) This is an instance of a more general family of models, called boosting models, which all iteratively try to improve a model built up from weak learners. Gradient boosting is this particular technique where we are trying to fit the residuals, and it's been found to work very well in practice, in particular if you're using shallow trees as the weak learners. In principle, you could use any model as a weak learner, but trees just work really well. --- # Gradient Boosting Algorithm `$$ f_{1}(x) \approx y $$` `$$ f_{2}(x) \approx y - f_{1}(x) $$` `$$ f_{3}(x) \approx y - f_{1}(x) - f_{2}(x)$$` -- $y \approx$ ![:scale 22.5%](images/grad_boost_term_1.png) + ![:scale 22.5%](images/grad_boost_term_2.png) + ![:scale 20%](images/grad_boost_term_3.png) + ... ??? Let's look at the regression case first. We start by building a single tree f1 to try to predict the output y. But we strongly restrict f1, so it will be rather bad at predicting y. Next, we'll look at the residual of this first model, so y - f1(x). We now train a new model f2 to try and predict this residual, in other words to correct the mistakes made by f1. Again, this will be a very simple model, so it will still not be able to fix all errors. Then, we look at the residual of both of the models together, so y - f1(x) - f2(x), so the mistakes that could not be fixed by f2, and we build f3 to fix that, and so on. This is natural for regression. For classification this is not as clear. For binary classification you use log-loss, or rather you apply the logistic function to get a binary prediction, for multi-class you can use 1 vs rest. So we're sequentially building up a model using what's called "weak learners", small trees, and create a more powerful composite model. --- # Gradient Boosting Algorithm `$$ f_{1}(x) \approx y $$` `$$ f_{2}(x) \approx y - \alpha f_{1}(x) $$` `$$ f_{3}(x) \approx y - \alpha f_{1}(x) - \alpha f_{2}(x)$$` $y \approx \alpha$ ![:scale 22.5%](images/grad_boost_term_1.png) + $\alpha$ ![:scale 22.5%](images/grad_boost_term_2.png) + $\alpha$ ![:scale 20%](images/grad_boost_term_3.png) + ...
Learning rate $\alpha, i.e. 0.1$ ??? - Iteratively add regression trees to model - Use log loss for classification - Discount update by learning rate FIXME plot for regression models Come back to this --- #GradientBoostingRegressor .center[ ![:scale 50%](images/grad_boost_regression_steps.png) ] ??? Here's an illustration for doing this for regression. This is a 1D regression dataset for illustration purposes here to form features on the x-axis, the prediction is on the y-axis. In the first step, I'm just fitting my tree to the data. I use a simple tree of depth 3. The depth 3 tree is not able to completely model the data and so the orange is the tree that was fit. After this first step, I look at the total predictions. So this is just alpha times the predictions made by the first tree. So you see everything is sort of squashed together. This is the effect of alpha. The blue points here in this next panel is this data minus the minus the predictions from step one, and so this is the residual. It still looks pretty much the same, because we took only a small step. Then I fit another tree to this residuals again of depth three. Then here's the total prediction, which is alpha times the first tree plus alpha times the second tree, followed against the original data. The orange has more steps now because it's a combination of two trees. As I continue the same procedure until step five, you can see that residual gets much smaller and it has learned most of the variations in the data. A total linear combination of all the trees and learning looks like this. And if I keep doing this, then at some point, residuals will become very small. And the total prediction will fit the data better and better. The question is can I extrapolate? The answer is no. The question is how is this different? And it's quite different. It’s kind of hard for me to answer his question. A) The combination of stumps is different than building a deeper tree because you always apply all the splits to the whole dataset. Whereas if you make a tree deeper, you will have different splits on the deeper nodes. If you have already like 10 nodes, and you want to grow one more level, each of these parts of the data will have a different split. Whereas if I add another stump it will be on a global level. In decision trees, decisions are very hard. And here you don't trust any hard decisions. So you only go a little bit in each direction. B) This works way better. So this was for regression and because it's easier to visualize, you can do the same thing for classification. Basically, what gradient boosting for classification does is you’re letting regression trees to learn decision function. So basically, you're doing regression again, but you're doing logistic regression. Instead of using a linear model for logistic regression, we're now using this linear combination of trees. So in other words, what we're doing is we're applying a log loss, and we're trying to find the regression function that has a small log loss. This f is the decision function that we're doing. And so inside a gradient boosting classifier, you're not actually learning classification trees, you're learning regression trees, which are trying to predict the probability, which is quite different. The question is, how they're different? The same is true for f1.  One reason is the alpha, which means I only go a small step. But even if I set alpha equal to one, the point is that I restricted my f1 to not completely fit the data. I'm not trying to completely overfit the data, I'm trying to use a simple model. So if I use a tree of depth one, there will be a very large residual. --- #GradientBoostingClassifier .center[ ![:scale 70%](images/grad_boost_depth2.png) ] ??? Here’s an illustration of what this might look like for classification. This is basically the same thing going on. I’m plotting the probabilities assigned by the model. Here's a first estimator, which makes some mistakes here and makes a bunch of mistake in the middle. This is the decision tree of depth two. Then I fit the model to the residuals here. To minimize the log loss of this dataset changes something in the middle, and so on. And you can see that as I add more and more estimator it fits the data better and better and gets more and more complex decision boundaries. Since it works like a gradient descent on log loss, it's a little bit harder to visualize this for classification. White mean probability of 0.5 (which is a tie). Red means high probability for the red class. Blue means a high probability for the blue class. Here, clearly, it hasn't fit the data perfectly. So I could add more and more models and then, in the end, it would fit the data perfectly. For multi-class, the default thing to do is One Versus Rest. --- class:spacious # Gradient Boosting Advantages - Slower to train than RF (serial), but much faster to predict - Small model size - Typically more accurate than Random Forests ??? It's sort of slower to train if you're training serial, but if you paralyze it, it's often faster to train since it has a much smaller model size. So the trees are usually not as deep and you don't need as many because you're doing much more focused learning where you try to correct the mistakes of the other models. So usually it’s very fast to predict because prediction can happen in parallel over all the trees, while learning cannot happen in parallel over all the trees necessarily. Usually, this is more accurate than random forests. The question is for the same number of estimators, how does low versus high learning rate changes? High learning rate allows you to fit the data more strongly and also overfit the data more strongly. --- class:spacious # Tuning Gradient Boosting - Pick n_estimators, tune learning rate - Can also tune max_features - Typically strong pruning via max_depth ??? There are several things you can tune about the gradient boosting. A common approach is to pick the number of estimators that you have time for. So runtime is obviously linear than number of estimators because you need to build each tree one by one. Each tree is built with the same parameters. And then you can tune the learning rate to see how strongly you want to fit the data. You can also tune something like max features if you want to add more randomness, but that's actually not very commonly used. You can also subsample the data if you want faster training. And typically there's a maximum depth. Traditionally, it was like maximum depth of one, two or three, though in kaggle people are doing like 8 to 10 or something. But typically, the depth is much, much smaller than for random forests. This means the model will be small in memory, and also will be faster to predict since you have less deep trees to traverse. Before we go into implementation I want to talk a little bit about analyzing the models. So again, because it’s a tree-based model, the prediction is a linear combination of trees, you can look at feature importance like the same way we did for random forest and trees. --- # Partial Dependence Plots - Marginal dependence of prediction on one or two features .smaller[ ```python from sklearn.ensemble.partial_dependence import plot_partial_dependence boston = load_boston() X_train, X_test, y_train, y_test = train_test_split( boston.data, boston.target,random_state=0) gbrt = GradientBoostingRegressor().fit(X_train, y_train) fig, axs = plot_partial_dependence( gbrt, X_train, np.argsort(gbrt.feature_importances_)[-6:], feature_names=boston.feature_names, n_jobs=3, grid_resolution=50) ``` ] ??? But there's also something else that's quite interesting, which is called Partial Dependence Plots that's actually possible for all trees. Unfortunately, in scikit-learn, it’s available only for the gradient boosting. So the idea here is to not only see what parameters are important but how will they influence the target. And so after you fit your model, I'm using the Boston data set to the gradient boosting regressor, there's a thing called plot partial dependence, which gets the model and the training data set and then the features for which I want to make the partial dependence plots. So here, I'm looking at the six most important features. The feature importance is important according to the trees. So I sort this and take the six most important ones. --- # Partial Dependence Plots .center[ ![:scale 70%](images/feat_impo_part_dep.png) ] ??? And so this is what the partner dependence plots look like. So this is the most important feature, the second most important feature and so on. This is sort of the marginal contribution of each feature. Basically, in each tree, you're summing out the contribution of all the other features, and you look only at what is the contribution of this particular feature. In general, this would be hard to compute. For tree-based models you can compute is a very efficient way because you can basically just sum up over the whole space by traversing the tree. Here with increased room size, the price increases and you can see how it increases and you can see that there's like a big step function here. And you can see that for increased LSTAT, the price decreases. For the others, there aren’t any drastic effect. There seems to be some threshold for NOX. And something funky going on DIS. The question is, so I said for random forest, you can't find out the direction of which way the feature influences. But that was for the feature importance. So the feature importance tells the impurity decrease. So here I also look at the feature importance and they're just numbers so they don't give you the direction. For both gradient boosting and random forest, you can look at partial dependency plot, and they will give you a non-parametric model of how a single feature influences it. Unfortunately, it’s not available in scikit-learn. You could do the same thing for random forests. Because in the end, the way they predict is quite similar. --- # Bivariate Partial Dependence Plots .smaller[ ```python plot_partial_dependence( gbrt, X_train, [np.argsort(gbrt.feature_importances_)[-2:]], feature_names=boston.feature_names, n_jobs=3, grid_resolution=50) ``` ] .center[ ![:scale 80%](images/feature_importance.png) ] ??? You can also do this in bivariate. So here, looking at the two most important features in a bivariate plot, I'm actually not giving it a list of features, but I'm giving it a list of list of features. And so the two most important features, LSTAT, and ROOM. You can see there’s no very complex interaction. As you can see, the effect of these two features taking into account all the other features. This is something you can usually do for linear model easily. If you do this for the linear model, you would have lines everywhere but for more complicated models this is very hard to do. Way more tricky to do in neural networks. --- # Partial Dependence for Classification .tiny-code[ ```python from sklearn.ensemble.partial_dependence import plot_partial_dependence for i in range(3): fig, axs = plot_partial_dependence(gbrt, X_train, range(4), n_cols=4, feature_names=iris.feature_names, grid_resolution=50, label=i) ``` ] .center[ ![:scale 50%](images/feat_impo_part_dep_class.png) ] ??? We can do the same for classification. Here is a partial dependency plot for the iris dataset. As I said, for classification we’re usually using One Versus Rest. So here, we have three classifiers. One classifier for sertosa, one for Versicolor and one for virginica. You can see that for the first two features they're like flat. But for sertosa the decision function is high for small part petal length, medium peddling for versicolor and large for virginca. These are all put through logistic function and then normalized. --- # XGBoost `conda install -c conda-forge xgboost` ```python from xgboost import XGBClassifier xgb = XGBClassifier() xgb.fit(X_train, y_train) xgb.score(X_test, y_test)) ``` - supports missing values - supports multi-core ??? In terms of implementation, there's a couple of implementation methods. Scikit-learn has gradient boosting classifier and gradient boosting regressor. Unfortunately, they are rather slow. So one of the most commonly used packages is XGBoost, which you can install from conda forge for example. It's completely scikit-learn compatible. So you can import XGBClassifier if you want you can use it with grid search or with pipelines. The cool thing is its fast. It supports missing values so you don't need to do an imputation strategy, you can put them directly into XGBoost. And it also supports multi-core. The gradient boosting in scikit-learn is just sequential on a single core which on most of the machines are not great. If you have a big machine you want to use all the cores in parallel. You can’t do that with scikit-learn but you can do it with XGBoost. For random forest, on the other hand, scikit-learn can also run random forest in parallel, because it's much easier. XGBoost also has a random forest. XGBoost also has some enhancements to the algorithm. It has L1 and L2 penalties for the leaves, so you can do something like an elastic net or lasso penalty to the leaves. I think by default, it's disabled. But they are not really training like the vanilla decision trees. One of the reasons they're faster is because they have a faster implementation. But you can make even faster if you use approximate splits in the trees. If you want to find a split, you need to search over all features and you need to search over all possible thresholds on the feature. Searching over all possible thresholds on the feature means soaring feature, which is an analog operation. Instead, what you can do is you can bin the features, and then its linear time operation but the threshold will be approximate. And that will make your computation much faster. - Efficient implementation of gradient boosting (5x sklearn) - Improvements on original algorithm - https://arxiv.org/abs/1603.02754 - Adds l1 and l2 penalty on leaf-weights - Fast approximate split finding - Scikit-learn compatible interface --- class: spacious .center[ ![:scale 50%](images/xgboost_sklearn_bench.png) ] - Exact splits ~5x faster on single core - Appoximate splits, multi-core -> more speed! - Also check lightGBM (even faster?) - Both have GPU support - https://github.com/szilard/GBM-perf ??? Here is actually for the exact version of XGBoost the comparison in terms of time and accuracy. This is for illustrative purposes. I ran this on amnest or subsets of amnest. The x-axis is the number of samples and so you can see how the runtime increases as the number of samples increases. For a significant number of samples, you can see that XGBoost is much faster. If you run on a single core XGBoost tends to be about five times faster, if you run it on a 10 core machine, it's going to be much, much faster. There's also an implementation out of Microsoft called lightGBM, which might be even faster. So according to a lot of latest benchmarks that I saw, lightGBM is actually fastest. LightGBM and XGBoost both have GPU support, which makes them even faster. For GPU support, the benchmark that I saw stated XGBoost was a bit faster while on CPU lightGBM was a bit faster. But both are pretty fast and highly paralleled optimized algorithms. So if you care about speeds, you want to use one of these two. --- # Early stopping - Adding trees can lead to overfitting - Stop adding trees when validation accuracy stops increasing - Optional in XGBoost and sklearn >= 0.20 (development) ??? As I said earlier, if you add more and more trees, the algorithms can overfit. So instead of searching for the learning rate, or searching for number of trees, you can also do early stopping. Because this is a sequential algorithm that gets better and better the more trees you add, you can just use a validation set and stop adding trees once you overfit. You can do that both with scikit-learn and XGBoost. Basically, the idea is that you pick a large number of estimators and you have a separate validation set and if the validation set accuracy doesn't improve or if it decreases for number of iterations, say five, then you just stop the learning. This way, you get results faster, because you don't keep learning but also you possibly get a better model because you know the overfitting. The only downside stopping learning is that you have fewer data to train your model because you need to the validation set for early stopping. You’ll still need a separate test set to see how well the model actually does. You can't use the same set for early stopping and for evaluation. --- class:spacious # When to use tree-based models - Model non-linear relationships - Doesn’t care about scaling, no need for feature engineering - Single tree: very interpretable (if small) - Random forests very robust, good benchmark - Gradient boosting often best performance with careful tuning ??? To summarize, tree-based models are really very, very popular family of models. They're very commonly used. You probably want to use them if you want nonlinear relationships, or if you have a lot of different kinds of weird features because they really don't care about scaling of the features, so it allows you to get rid of mostly preprocessing. If you want very interpretable model, single trees or small single trees are good ideas, because it's one of the few models that you can sort of write down on a blackboard and show to someone, and they'll have some idea of what's going on. That's impossible for any other models. Random forests are great because they're very robust. And you don't have to tune anything, you just run a random forest with 100 trees and with the default settings and it will work great. And so this one of my first benchmarks. Usually, I first ran a logistic regression then I run random forests. Gradient Boosting is often the best performing model, sort of the centered toolbox. Sometimes you need to tune a little bit more, so you need to tune the depth of the trees or the learning rate, and so on. But if you tune them, then they will usually beat random forest on those data sets. One case where you might not want to use trees is if you have very high dimensional sparse data then linear models might work better but also your mileage may vary. On the contrary, if you have like a low dimensional space, tree-based models are probably a good bet. Next thing we'll talk about is a different way to build ensembles, different way to put together multiple models. --- class: centre,middle # More ensembles: Stacking ??? That's called stacking. So last time, we talked about bagging and model averaging. And stacking basically goes a little beyond that, in that it tries to stack models on top of each other. --- # Simplified Stacking .tiny-code[ ```python from sklearn.neighbors import KNeighborsClassifier X, y = make_moons(noise=.4, random_state=16, n_samples=300) X_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, random_state=0) voting = VotingClassifier( [('logreg', LogisticRegression(C=100)), ('tree', DecisionTreeClassifier(max_depth=3)), ('knn', KNeighborsClassifier(n_neighbors=3))], voting='soft') voting.fit(X_train, y_train) lr, tree, knn = voting.estimators_ ``` ] .center[ ![:scale 90%](images/average_voting.png) ] ??? This is not simplified stacking. This is basically just averaging models. This is one of the simplest ensemble we saw last time. So here, I have this two-class data set and I trained a logistic regression, a decision tree, and KNN. So in simple ensemble, I just average all the probabilities and then take the arg max as a prediction. And that's implemented in the voting classifier that we saw last time. But instead of just taking an average, what we could do is take a weighted average, for example. And so the way to do that would be…. --- # Simplified Stacking .tiny-code[ ```python stacking = make_pipeline(voting, LogisticRegression(C=100)) stacking.fit(X_train, y_train) print(stacking.score(X_train, y_train)) print(stacking.score(X_test, y_test)) ``` ``` 0.90 0.77 ``` ```python stacking.named_steps.logisticregression.coef_ ``` ``` array([[ 0.487, 1.519, 3.686]]) ``` ] .left-column[
![:scale 90%](images/average_voting.png) ] .right-column[ ![:scale 90%](images/simple_stacking_result.png) ] ??? --- class:centre,middle ## Problem : Overfitting! ??? One way is simplified stacking, where you take the probability estimates by all of the models as an input, and you train logistic regression on these probability estimates in an effort to predict the class. This is basically weights for each of these probability estimates. And then you can take the weight average. So here, I used a pipeline out of voting classifier logistic regression. If I used the voting classifier as a transformer, it'll just transform into the probabilities. So here are the coefficients, there are three coefficients, one for each of the models. You can see that it trusts the logistic regression the least, the decision tree a little bit more, and the KNN the most. Instead of just averaging, you get something like this. Instead of using logistic regression, we could use any model we want, you could use a decision tree, random forest, gradient boosting neural network, I can train whatever model I want on the probabilities created by these 3 models. The question is why don't we just simply take the most accurate model? Because averaging them is often better. There’s a problem with doing this, though, which is that you basically overfit the trained data a lot. The thing is that here we train logistic regression on the training data and we train the logistic regression on the probability estimates of these other models on the training data. So the more the model overfit well it will be on the training data. The KNN for example, overfit quite a bit. If you do this on trained data set, the model that overfit most is the most informative on the training dataset, because it does perfectly. So then the second stage model will learn to trust the one most that overfits most. And clearly, you don't want that. There are two ways to overcome this. --- class:spacious # Stacking - Use cross-validation (even LOO!) to produce probability estimates on training set. - Train second step estimator on held-out estimates - No overfitting of second step! - For testing: as usual ??? While you can either just hold the hold-out set and use a single hold-out set to train a second stage model. So then on the hold-out set, the model that overfits obviously doesn't do as well on the hold-out model. And so the second stage will not trust the overfitting model. --- # Hold-out estimates of Probabilities ![:scale 100%](images/holdout_estimate.png) - Split 1 produces probabilities for Fold 1, split2 for Fold 2 etc. - Get a probability estimate for each data point! - Unbiased estimates (like on the test set) for the whole training set! - Without it: The best estimator is the one that memorized the training set. ??? The other way is to use cross-validation. And basically, now, instead of having a single hold-out set, you have multiple hold-out sets. So for each data point, you need to compute the features. And the way you compute the features of the first stage on the training set is you train the model on the remaining folds and then you do probabilistic predictions or probabilistic estimates on this data point in the training set. But the model that you're using for this probabilistic estimates was not trained on this data. You can do leave one out, for example, and you can train a model on all of the other data and then predict probabilities for one point. Obviously, that's going to be very slow. You can also do something like 5 fold cross-validation, wherein the first stage, you have to train the model five times and then get hold-out probability estimates for each of these. This way, you have unbiased probability estimate for all training data points. The output of the first stage with cross-validation would be just the features which are probability estimates of the underlying model. Only now, instead of being biased, their unbiased estimates because it's hold-out data. The benefit of doing this compared to single hold-out set is that the second stage now has much more training data because the training dataset is the same size. I have unbiased probability estimates for my models for all data points. So I have the same size training set only without overfitting now. --- .tiny-code[ ```python from sklearn.model_selection import cross_val_predict # take only probabilities of positive classes for more interpretable coefficients first_stage = make_pipeline(voting, FunctionTransformer(lambda X: X[:, 1::2])) transform_cv = cross_val_predict(first_stage, X_train, y_train, cv=10, method="transform") second_stage = LogisticRegression(C=100).fit(transform_cv, y_train) print(second_stage.coef_) ``` ``` [[ 2.192 1.402 1.012]] ``` ```python print(second_stage.score(transform_cv, y_train)) print(second_stage.score(first_stage.transform(X_test), y_test)) ``` ``` 0.813 0.800 ``` ] .center[ ![:scale 40%](images/simple_stacking_result.png) ![:scale 40%](images/stacking_result.png) ] ??? And so here is the result of this. There is a pull request in scikit-learn to do this directly. I do it slightly differently using cross_val_predict, cross_val_predict allows me to apply any method inside cross-validation. Here, I'm using the transform method of the voting classifier, and I'm using 10 fold cross-validation to always just use transform on the hold-out set. So computing the probabilities of the voting classifier on the hold-out set. TransformCV is something of the same number of samples as a training data set. And it has 3 dimensions, which are the 3 probability estimates. And then again, here I train logistic regression on it and I get coefficients. And so now you can see that here in the coefficients, the first model was logistic regression, it trusts this more. The trust for the coefficient of the trees is similar. The last one, the nearest neighbor now has the lowest weight. So here's the model that we had just doing a logistic regression, training on the training dataset. And here's with proper stacking where you use hold-out probability estimates. And you can see here, there's much less overfitting going on and they're sort of much more uncertainty here. For prediction, this cross-validation doesn't really change anything, if you apply this to the test set… The standard way is to train a model on the whole training set, and then use this to estimate the probabilities on the test set. So this cross-validation is only to get probability estimates on the training set to train the second stage. The next thing I want to talk about is similar stacking but actually has a different goal. The goal in stacking is really to blend different models in a smart way. And so you take multiple models, you try to build a stronger, more expressive model by blending these models using some weighting. --- class:spacious #Calibration .center[
Source
] - Probabilities can be much more informative than labels: - “The model predicted you don’t have cancer” vs “The model predicted you’re 40% likely to have cancer” ??? So the next thing I want to talk about is calibrations. Calibration also builds a model on top of a model. But the goal of calibration is to actually get accurate probability estimates. Oftentimes, we’re interested not only in the output of the classifier, but also interested in the uncertainty estimate of a classifier. So for example, think about a model that does cancer prediction. If the model predicted you don't have cancer, you're going to be pretty happy. If it says there’s a 40% chance that you have cancer, which is the same thing if you have a binary classification, you might be less happy since 40% seems pretty high for having cancer anyway. So often, we want actual probability estimates that allow us to make decisions that are finer grained than just a yes or no. Calibration is a way to get probability estimates out of any models. For example, SVMs are not good at breaking probabilities, so you can use calibration if you really want to use an SVM and get the probabilities out. Or if you have a model that already was able to predict probabilities like tree or random forests or nearest neighbors, you can use calibration to make sure that the probabilities that you get are actually good probabilities. So if you use random forest and use it to estimate probabilities, if it says “this is 70% class one”, it's not really clear what it means because the model is not really trained to optimize probability estimates so the probability estimates could be off quite a bit. --- class: spacious #Calibration curve (Reliability diagram) .left-column[ ![:scale 80%](images/prob_table.png) ] .right-column[ ![:scale 80%](images/calib_curve.png) ] ??? Before we talk about how to do calibration, I want to talk about how to measure calibration and binary classification. You can also do it for multiclass classification, but binary is much simpler. The cool thing about it is you can actually measure calibration and you can calibrate the classifier without having round first the probability estimates. So even if you only have like 0 or 1 labels you can still make sure that you have a model that provides reasonable probabilities.  So here, for example, let's say these are probabilities estimate by a model, these are my true targets. So now I sort and bin them by the probability estimates. And then I create three bins. And then I look at what is the actual prevalence of the classes in each of these bins. If these probabilities estimates were actually accurate, then let's say if I have a bin for all the 90% ones, the prevalence in the 90% bin should actually be 90%, that's sort of what it says. 90% of the points that are given a score of 90% should be the true class. And so you can plot this in the calibration curve or the reliability diagram. So here I have three bins. And basically what I wanted is the diagonal line where the bin that contains the very small probabilities has the same prevalence. And so here, for example, things that are around like 0.5 actually have zero prevalence. So there's no true class in there, which is really weird. You won’t use a diagonal line, this would be a very bad classifier. One thing that I want to emphasize here is that calibration doesn't imply that the model is accurate. These are actually two different things. If I have a binary model on a balanced data set, and it always says 50% probability for all data points. It's perfectly calibrated because it says 50% for all data points. 50% of those data points are actually the true class if the dataset is balanced. So it's a completely trivial classifier that doesn't tell you anything but perfectly calibrated, but also kind of tells you nothing because it always gives you 0.5. So you know that you can trust it basically. Calibration basically tells you how much you can trust the model. - For binary classification only - you can be calibrated and inaccurate! - Given a predicted ranking or probability from a supervised classifier, bin predictions. - Plot fraction of data that’s positive in each bin. - Doesn’t require ground truth probabilities! --- class: split-40 # calibration_curve with sklearn Using subsample of covertype dataset .left-column[ .tiny-code[ ```python from sklearn.linear_model import LogisticRegressionCV print(X_train.shape) print(np.bincount(y_train)) lr = LogisticRegressionCV().fit(X_train, y_train) (52292, 54) [19036 33256]``` ```python lr.C_ array([ 2.783]) ``` ```python print(lr.predict_proba(X_test)[:10]) print(y_test[:10]) [[ 0.681 0.319] [ 0.049 0.951] [ 0.706 0.294] [ 0.537 0.463] [ 0.819 0.181] [ 0. 1. ] [ 0.794 0.206] [ 0.676 0.324] [ 0.727 0.273] [ 0.597 0.403]] [0 1 0 1 1 1 0 0 0 1] ``` ] ] .right-column[ .tiny-code[ ```python from sklearn.calibration import calibration_curve probs = lr.predict_proba(X_test)[:, 1] prob_true, prob_pred = calibration_curve(y_test, probs, n_bins=5) print(prob_true) print(prob_pred) [ 0.2 0.303 0.458 0.709 0.934] [ 0.138 0.306 0.498 0.701 0.926] ``` ] .center[![:scale 70%](images/predprob_positive.png) ] ] ??? I'm using a subsample of cover type dataset because it's kind of big and we get some nice histograms here. So I train a logistic regression model. Logistic regression typically gives pretty good probability estimates. So I expect this model to be relatively well calibrated. For the first 10 data points, the probabilities and the actual predictions. So what I'm going to take is the predicted probabilities for all data points, for the first class and the actual predictions. Obviously, I need to do this on the test set. If I do this on the training set, then it'll tell me nothing, because on the training set the model is good. So either I need to do this on a test set or on some of the holdout set. On the training set, if I perfectly overfit, I would be doing perfect, but that's not the point. So here, I need to use a separate set and so I can compute the calibration curve. You can see the histogram here shows how many points are in this area. And here, the orange thing is the actual calibration curve, the dotted line is sort of perfect calibration. And in here, I’m using five bins. The first bin is zero until 0.2, so I would expect that 10% of the data in this bin 10 is the true class, but actually, it's more like 20%. So here, it's like not perfectly calibrated. In the second bin from 0.2 to 0.4. So what I would expect is that 30% of these data points are predicted as class one and actually- it's 30%. --- class:spacious #Influence of number of bins .center[![:scale 100%](images/influence_bins.png)] ??? How do I pick the number of bins? More bins give me more resolution. But also at some point, you get noise. So I guess it's the same way you would do for histogram. You can use the standard heuristic for histogram but usually, if you do something like 10 or 20, that's usually enough bins. - Works here because dataset is big - Might become very noisy for larger datasets --- class:spacious # Comparing Models .center[![:scale 90%](images/calib_curve_models.png)] ??? Logistic regression is pretty well calibrated. The decision tree, since I didn't use any pruning, it'll be way too certain. So all probabilities estimates, even on a test set that will be either 0 or 1. So that's not very great. Random forest classifier used here is not certain enough. Now we want to fix that. Before I want to say how we can trust them let's measure them first. --- # Brier Score (for binary classification) - “mean squared error of probability estimate” `$$ BS = \frac{\sum_{i=1}^{n} (\widehat{p} (y_i)-y_i)^{2}}{n}$$` .center[![:scale 70%](images/models_bscore.png)] ??? This graph is a nice way to look at how calibrated something is. But it's very hard to compare. A standard way to compare calibration is a Brier score, you could also use something like a log loss. Log loss would also tell you how good that a probability estimate is. Brier score is the mean squared error of probability estimates. Yi is either one or zero, basically, and p ̂ is the probability estimate. So if you predict 0.5 then it's always going to give you a loss, but it's going to give you a loss of only 0.5. If you predict 0 when you should’ve predicted 1 then it's going to give you a very large loss. Here are the brier loss for the different models. Also, the smaller is better. But this conflates accuracy and calibration a little bit because here, you can see that the random forest actually does best-. I guess it does better because just it's a more accurate model. So it's not well calibrated. But it is actually a much better predictor and so it still has a smaller score. We defined it, we can measure it and we actually want to calibrate it. --- # Fixing it: Calibrating a classifier - Build another model, mapping classifier probabilities to better probabilities! - 1d model! (or more for multi-class) `$$ f_{callib}(s(x)) \approx p(y)$$` - s(x) is score given by model, usually - Can also work with models that don’t even provide probabilities! Need model for $f_{callib}$, need to decide what data to train it on. - Can train on training set → Overfit - Can train using cross-validation → use data, slower ??? The way to do fix this is similar to stacking and that we built another model on top of the probability estimates. So usually, that's just a 1D model because we only have 1 underlying model. If you have binary classification it gives us a single probability output and so we need to learn 1D function that basically maps this probability to something that is more accurate. It also works if the model gives us a score rather than a probability. SVM only gives us a score, we can still learn one leave function that tries to get probabilities. Similar to what we did was stacking. So you don't want to learn this the calibration model on the training data set because on train dataset you're doing very well. So you need to use either a whole dataset or you need to use cross-validation again. --- # Platt Scaling - Use a logistic sigmoid for $f_{callib}$ - Basically learning a 1d logistic regression - (+ some tricks) - Works well for SVMs `$$f_{platt} = \frac{1}{1 + exp(-ws(x))}$$` ??? There are two main methods that people use and both are in scikit-learn. One is Platt scaling, Platt scaling is basically the same as 1D logistic regression. So you learn to 1d just sigmoid plus, there's like some new tricks. This basically allows you to fix a particular sigmoid shape that you usually get from SVM scores and this works well for SVMs. But you only have one parameter here, so there's not a lot that you can tune. --- # Isotonic Regression - Very flexible way to specify $f_{callib}$ - Learns arbitrary monotonically increasing step-functions in 1d. - Groups data into constant parts, steps in between. - Optimum monotone function on training data (wrt mse). .center[![:scale 40%](images/isotonic_regression.png)] ??? The other one is Isotonic regression, which is basically a non-parametric mapping. What it does is it fits the monotone function that minimizes the squared error. The problem it’s solving is the peace wise constant function that’s monotonous with minimums error. So this what it looks like and so if you have to data in red, then standard regression will find this green thing. In Platt scaling, s(x) is what the model scores, the score that comes from the SVM or random forest. The w is the one parameter you learn from the data. This is a very inflexible model that allows you to say how steep should the sigmoid correction be while Isotonic regression is a very flexible model that allows you to correct anything in any way, it’s monotonous. --- class:spacious # Building the model - Using the training set is bad - Either use hold-out set or cross-validation - Cross-validation can be use as in stacking to make unbiased probability predictions, use that as training set. ??? --- # CalibratedClassifierCV .tiny-code[ ```python from sklearn.calibration import CalibratedClassifierCV X_train_sub, X_val, y_train_sub, y_val = train_test_split(X_train, y_train, stratify=y_train, random_state=0) rf = RandomForestClassifier(n_estimators=100).fit(X_train_sub, y_train_sub) scores = rf.predict_proba(X_test)[:, 1] plot_calibration_curve(y_test, scores, n_bins=20) ``` .center[![:scale 30%](images/random_forest.png)] ] ??? --- # Calibration on Random Forest .smaller[ ```python cal_rf = CalibratedClassifierCV(rf, cv="prefit", method='sigmoid') cal_rf.fit(X_val, y_val) scores_sigm = cal_rf.predict_proba(X_test)[:, 1] cal_rf_iso = CalibratedClassifierCV(rf, cv="prefit", method='isotonic') cal_rf_iso.fit(X_val, y_val) scores_iso = cal_rf_iso.predict_proba(X_test)[:, 1] ```] .center[![:scale 90%](images/types_callib.png)] ??? This is for a random forest again. It can use calibrated classifier CV. This does calibration. You can either you do it with single hold-out dataset or with cross-validation. Here, I'm using a single holdout set. I split my dataset, the training set into X_train_sub and X_val. X_train_sub is what I used to train a random forest and then x_val is what I'm going to use to calibrate it. I created calibrated classifier CV with the random forest that I’ve already fit on the training dataset. I set cross-validation to prefit and set the method to sigmoid. And then I can fit this calibration model on the validation set. So here is what this looks like, the random forest model with no calibration, with sigma calibration and with isotonic calibration. In this case, sigmoid and isotonic don't look very different. They both look like reasonably calibrated. That said if you're doing sort of holdout set, destroying away a bunch of data for training your first model. --- # Cross-validated Calibration ```python cal_rf_iso_cv = CalibratedClassifierCV(rf, method='isotonic') cal_rf_iso_cv.fit(X_train, y_train) scores_iso_cv = cal_rf_iso_cv.predict_proba(X_test)[:, 1] ``` .center[![:scale 90%](images/types_callib_cv.png)] ??? So we can also not specify CV, then it uses cross-validation, I think 3 fold by default. And so then it does the whole cross-validation thing internally. And then I get an even better calibration. So what it does here for each cross-validation it trains a separate model. And then if I want to predict on the test set, it uses all of these models and then averages them. So in a sense, it's not very surprising that I get a better result here because I built 3 random forest models on subsets of the data and then average them. I calibrated them and I averaged calibrated models. So I basically just build a bigger random forest, so it's not very surprising that it does better. Also, we were able to use more data. So if you do this, you retain as many models as there are cross-validation folds and you use all of them in prediction. - kinda cheating, we have more trees now lol - we use all the data, get good probabilities. just time-consuming --- # Multi-Class Calibration .center[![:scale 100%](images/multi_class_calibration.png)] ??? You can also do this for multi-class calibration, which does basically the same thing, but you just do it for each class individually and then you normalize again and you can make pretty pictures. - per-class calibratoin - renormalization --- class: center, middle # Questions ?


Question 3: Change the color of element which class name end with "-new"
Object to add class
Java
HTML
Python
CSS


If you have problems with City Hub, we have these tools to help investigate and fix potential issues that might occur.
Open Wallet Folder Reset Blockchain Database Check for Update Download Update Install Update
Go back


struct Set(T)
- Set(T)
- Struct
- Value
- Object
Overview
Set
implements a collection of unordered values with no duplicates.
An Enumerable
object can be converted to Set
using the #to_set
method.
Set
uses Hash
as storage, so you must note the following points:
- Equality of elements is determined according to
Object#==
andObject#hash
. Set
assumes that the identity of each element does not change while it is stored. Modifying an element of a set will render the set to an unreliable state.
Example
s1 = Set{1, 2}
s2 = [1, 2].to_set
s3 = Set.new [1, 2]
s1 == s2 # => true
s1 == s3 # => true
s1.add(2)
s1.concat([6, 8])
s1.subset? s2 # => false
s2.subset? s1 # => true
Included Modules
- Enumerable(T)
- Iterable(T)


Before Change
warped = nipy2nifti(warped, strict=True)
return warped, T
warped, affine_init = affine_registration(nib_static, nib_moving)
static = nib_static.get_data().squeeze().astype(np.float32)
moving = warped.get_data().squeeze().astype(np.float32)
After Change
the pyramid. The 0-th level corresponds to the finest resolution.
opt_iter = [5, 10, 10]
registration_optimizer = SymmetricDiffeomorphicRegistration(metric, opt_iter)
Execute the optimization, which returns a DiffeomorphicMap object,
that can be used to register images back and forth between the static and moving
domains
mapping = registration_optimizer.optimize(static, moving,
static_affine, moving_affine, pre_align)
Now let"s warp the moving image and see if it gets similar to the static image


Exercicio01
This is a Heading
This is a paragraph.
Exercicio02
This is a Heading
This is a paragraph.
Exercicio03
This is a Heading
This is a paragraph.


Data and Information Management
In this section will cover issues related to information management that support innovation and competitive advantage. Data Modeling with Entity Relationship (ER) diagrams, data quality, building analytic capacity, and providing user friendly access to organizational data will all be covered.


How To Make A Detox Green Smoothie
Life can be toxic. From contaminants in food and water to noxious chemicals in cleaning and hygiene products, toxins are part of everyday life.
However, you don’t need questionable detox supplements or liquid, starvation diets to cleanse your body from the inside out. Fresh, whole, ripe fruits and vegetables as well as an active, low-stress lifestyle supports your body’s natural detoxification abilities more than any product can.
Your body is always in a state of detoxification – regardless of how you eat. Detoxification doesn’t begin only when you do a cleanse or a juice fast.
I do not agree with, nor do I support, the commonly promoted idea that your body holds or accumulates toxins, needing periodic cleanses to purge these toxins in order to restore health or heal from disease. There is zero scientific evidence to support this.
Read about what detox symptoms really mean, and what do do if you experience them.
When I refer to “detox” or “cleansing” on Incredible Smoothies, I am talking about cleaning up your diet by consuming whole foods that support your body’s natural cleansing abilities.
Therefore, a “detox green smoothie” doesn’t start detoxification in your body, but helps support optimum health and the functioning of your primary detoxification organs.
The types of cleanses I support are not liquid starvation diets or dubious, powdered detox supplements. Instead, a short-term regimen of green smoothies (and smoothie bowls) can help break through a weight loss plateau, and break the cycle of bad eating habits and low energy levels.
Unlike juices or lemon-water regimens, green smoothies can feed your body while giving you a fresh start.
There are a few specific green smoothie ingredients that go above and beyond to promote cleansing. These include water-rich, fiber-rich organic fruits, bitter leafy greens (dandelion, kale), and other ingredients that stimulate digestion.
Fresh fruits and vegetables are the ultimate foods for supporting a clean, healthy body. They are water-rich and hydrating. They are also full of fiber, which supports a healthy colon (your body’s main detox organ). The ultimate cleansing fruits include citrus (orange, grapefruit, lemon, and lime).
Sadly, one source of potential toxins in our food comes on our fruits and vegetables. Pesticide residues are found in many fruits and vegetables, and an organization called the Environmental Working Group produces an annual “Dirty Dozen” list of items that have shown to have the highest concentrations of pesticide residues.
In 2016, the Environmental Working Group’s annual “Dirty Dozen” list included strawberries, apples, stone fruit (peaches, nectarines, cherries), and grapes, as well as leafy greens like spinach and kale. Due to the high level of pesticides used on these products while they are grown, they may have higher levels of residues by the time they are sold. Therefore, it is best to always buy organic versions of these foods.
Many fruits are treated with fungicides to prevent mold and extend shelf life, too. While these chemical treatments are generally considered safe, many people prefer to buy fruit that hasn’t been treated, or coated in wax to enhance appearance.
While dark, leafy greens give you superpowers (okay, maybe not superpowers, but definitely a health boost), they play a critical role in supporting optimum health. Leafy greens are rich in minerals, and contain antioxidant compounds that may protect against disease.
Leafy greens contain large amounts of chlorophyll, a plant compound that gives green vegetables their color. While the clinical evidence is limited, some natural health experts believe that chlorophyll helps support healthy blood and cleanses the body. Most experts suggest that dandelion greens are the ultimate detox green, claiming that they are particularly useful for supporting kidney and liver function.
Garlic is a very popular food that is said to have cleansing properties. While it might be a bit weird for many of you to blend into a green smoothie, you can add it to freshly-made blender soups.
Fresh ginger stimulates your digestive tract and speeds up digestion. It can also help fight nausea. Fresh ginger can be grated into a green smoothie or added to fresh juices, and may help move things along in your digestive tract if you’re regretting what you ate.
Instead of thinking about cleansing as a once-in-a-while event, look for ways to support your body’s natural cleansing abilities through what you eat day-to-day, and in your overall diet.
However, a periodic cleanse can help get you back on track with healthy eating.
It can help you break bad eating habits, while resetting your taste buds to enjoy healthy foods.
A cleanse can help you recover from acute illness by flooding your body with nutrients.
"DETOX Green Cleansing Smoothie"
Looks so Delicious. Wrote down the recipe, will try to make it in the next few days.
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean.
Dog Instinct takes privacy seriously. The following five principles underpin our approach to respecting your privacy:
1. We value the trust that you place in us by giving us your personal information. We will always use your personal information in a way that is fair and worthy of that trust.
2. You are entitled to clear information about how we use your personal information. We shall always be transparent with you about what information we collect, what we do with it, with whom we share it and whom you should contact if you have any concerns.
3. If you have any concerns about how we use your personal information, we will work with you to promptly resolve those concerns.
4. We will take all reasonable steps to protect your information from misuse and keep it secure.
5. We will comply with all applicable data protection laws and regulations and we will co-operate with data protection authorities. In the absence of data protection legislation, we will act in accordance with generally accepted principles governing data protection.?
Dog Instinct PRIVACY POLICY
Dog Instinct is committed to protecting your privacy and ensuring that your personal information is protected. This Privacy Policy explains the types of personal information we collect and how we use, disclose and protect that information.


Basic Information
Job Title
Category
Location
Work Type
Job Description
Salary Settings
Salary Type
Income
Other Inforamtion
Contact Information
Youtube Address


Venn 7: Exploring Symmetric 7-Venn Diagrams with a Musical Interface
Venn 7 is a Web app exhibiting interactive versions of symmetric 7-Venn diagrams by mapping them to musical chords.
Click on regions in the diagrams to play chords, and use the arrows to navigate between the six 7-Venn diagram and one 5-Venn diagram. Read on for an explanation of what's going on here.
Venn diagrams
You may be familiar with the following Venn diagrams, which visualize all possible Boolean operations of two and three sets:
To introduce some clear terminology, the boundary of each set is referred to as a "curve," and the shapes formed by intersections and differences of curves are the "regions." The 2-Venn diagram has three regions and the 3-Venn diagram seven regions. In general, an n-Venn diagram has exactly 2n - 1 regions. Finally, we'll define the "order" of a region as the number of curves it is contained in.
What about a 4-Venn diagram? Our first attempt might look like this:
On closer inspection, this diagram is incorrect. There are only 13 regions compared to an expected 15. The two missing regions are of order 2, those that would be formed by the intersection of the two diagonally opposite curves. In this case, there is no region contained by x and w but not y and z, and no region contained by y and z but not x and w.
A correct Venn diagram with all 15 regions looks like this (Keep Talking players may recognize this one):
But unlike the 2-Venn and 3-Venn diagrams, it requires ellipses rather than circles, and doesn't have fourfold rotational symmetry like we would expect. In fact, no 4-Venn diagram exists using only circles, and no 4-Venn diagram can be fourfold rotational symmetric.
As we can gather, Venn diagrams of order 4 or more don't generalize easily from the 2-Venn and 3-Venn diagrams. In fact, it isn't obvious whether Venn diagrams even exist at all for n > 4. The answer to this question was positively resolved by Venn himself, who described an inductive construction involving drawing curves around the borders of other curves:
By continually adding these folded curves, we can show that there are valid Venn diagrams for all n > 4. This settles the existence question, but these diagrams sure look messy. Moving the goalposts, how can we find a sufficiently "nice-looking" Venn diagram of high order?
A good place to look is symmetric Venn diagrams — n-Venn diagrams with n-fold rotational symmetry. We've mentioned that no 4-Venn diagram can be symmetric, which follows from Henderson's theorem:
Henderson's theorem: if a symmetric n-Venn diagram exists, then n must be prime.
That brings us to n = 5, which is prime. There are a handful of 5-Venn diagrams, but there is only one that is simple — that is, no three curves intersect at one point. Grünbaum found the only simple symmetric 5-Venn diagram in 1975, a pretty figure that can be rendered using five congruent ellipses:
(This figure is included in the web app, but we use peanut-shaped regions for visual evenness.)
Fast-forward to 1992, and Grünbaum publishes a paper containing this stunning figure — the first simple symmetric 7-Venn diagram:
As more simple symmetric 7-Venn diagrams were found, two additional special constraints were established to narrow the search:
- Monotone: The regions sort themselves into concentric layers by order. Formally, each region of order 1 < k < n is bordered by regions of order k + 1 and k - 1. (The above diagram is not monotone. The reason is left as a reader exercise.)
- Polar symmetric: The Venn diagram is topologically identical if turned inside out.
It was shown that there are exactly six "golden 7-Venn diagrams" that satisfy all three of these properties, named Adelaide, Victoria, Massey, Manawatu, Palmerston North, and Hamilton. If the polar symmetric condition is relaxed, there are an additional 16 "silver 7-Venn diagrams."
The n = 11 case was mysterious for a long time — some symmetric diagrams were found but none were simple. In 2012, Mamakani and Ruskey made a breakthrough discovery christened "Newroz," along with over 200,000 more. Unfortunately, these diagrams are less tenable as interactive Web apps, since most of the 2,047 regions are very small.
About the app
Pandiatonicism is a broad variety of musical practices that use the diatonic scale in ways "beyond" tonal harmony. A common pandiatonic technique is to treat the seven tones as roughly uniform, just as dodecaphony views the 12-tone chromatic scale. This idea is realized in pitch class set theory mod 7 (Santa, 2000), which adapts classical 12-tone set theory to pandiatonic music by thinking of diatonic chords as subsets of the scale.
My friend Nathan Turczan originally inspired this project by pointing out that the curves of a 7-fold Venn diagram can be mapped to a diatonic scale, making the Venn diagram into a playable visualization of set theory mod 7. I loved the idea, and it stuck with me for a good two years until I finally caved and built it. Just as we anticipated, the resulting interface is as awkward and strange as it is fascinating. It is definitely not meant to be a serious contender for a viable musical interface, but more of a net art project on its own.
I noticed early on that standard synthesizer tones on the diagram produced a discontinuity as the scale wraps back to the octave. For example, there are seven regions on a diagram representing diatonic seconds, but one of those has to be a seventh, breaking the symmetry. To address this, I decided to use Shepard tones, an auditory illusion where a note has ambiguous octavation. This closes the seam formed by the octave and makes the tones reflect the symmetry of the diagram.
Conclusions
For source code, see the Git repo.
Since the data generation is decoupled from the app, I would love to see what other things you can do with it. Some fun ideas:
- virtual MIDI keyboard as a VST plugin
- posters
- string or wire art (all Venn diagrams are representable as woven strings)
- physical instrument with buttons
- tattoo
- dartboard
- Twister mat
- 7-day weekly planner
- eccentric billionaire mansion floor plan
Acknowledgements
Thanks to Nathan Turczan for the inspiration, and Luke Nihlen for early feedback. Dedicated in memory of Eddie Gale.
References
- Venn, John. 1881. Symbolic Logic.
- Venn, John. 1880. "On the diagrammatic and mechanical representation of propositions and reasonings." Philosophical Magazine.
- Cao, Tao et al. 2010. "Symmetric Monotone Venn Diagrams with Seven Curves."
- Grünbaum, Branko. 1975. "Venn Diagrams and Independent Families of Sets."
- Grünbaum, Branko. 1992. "Venn Diagrams II." Geombinatorics. Issue II, Vol. 2. (The PDF is hard to find, but it's out there — let me know if you want a copy.)
- Grünbaum, Branko. 1999. "The search for symmetric Venn diagrams."
- Ruskey, Frank and Weston, Mark. 1997. "A Survey of Venn Diagrams."
- Santa, Matthew. 2000. "Analysing Post-Tonal Diatonic Music: A Modulo 7 Perspective."
- Mamakani, Khalegh and Ruskey, Frank. 2012. "A New Rose: The First Simple Symmetric 11-Venn Diagram."


Golf Courses
Home
See more
Sign it
Prices
Concat
WELCOME TO GOLF COURSE
See More
Prices
Want to play best golf ? Please fill with your email
Send


Five killed, hundreds injured in Iran earthquake
by By Digital Desk staffAt least five people have died and hundreds more injured in an earthquake in north-western Iran, according to the BBC.
The 5.9 magnitude tremor hit East Ezerbaijan, with most of the injuries caused by crowd stampedes, state-run TV reports.
The earthquake injured 312, though only a dozen or more needed hospital treatment.
Up to 30 homes were destroyed and 60 aftershocks reported.


Overviwe
-
→ Introduction
Problem Statment -
Hydroponics Systems
Definition, Basic Systems.... -
Intrnet of Things
Definition, Arch. and Basic protocols -
Hydro-Smart
System Overview and Architecture -
Conclusion
-
Future Works
Introduction
Introduction
You're one of seven billion people that eats food every day
Introduction
Over the next three decades, we will need to address one of the most critical global challenges of our generation.
Introduction
We are not talking about climate change.
9.8 Billion
with 68% living in urban cities
Introduction
In order to feed this massive population.
- increase our agricultural output 70%
Introduction
In order to feed this massive population.
Put simply, not only is our global population becoming bigger, but it's also getting denser, and we will need to grow significantly more food using significantly less land and resources.
- increase our agricultural output 70%
Introduction
In order to feed this massive population.
Put simply, not only is our global population becoming bigger, but it's also getting denser, and we will need to grow significantly more food using significantly less land and resources.
- increase our agricultural output 70%
- Wasted food in billoin ton 1.6
Introduction
In order to feed this massive population.
Put simply, not only is our global population becoming bigger, but it's also getting denser, and we will need to grow significantly more food using significantly less land and resources.
- increase our agricultural output 70%
- Wasted food in billoin ton 1.6
- 600 million Sick
Hydroponics
Hydroponics What and Why?
Instead of growing in soil, the plants' roots will get the nutrients and oxygen from a water solution oxygenated with dissolved minerals and nutrients.
-
Less water
-
Productivity
-
Cost
-
Fresh
Drip system
The principle behind hydroponic drip systems is the simplest. Plants are supported by an inert material instead of soil. Then, vital nutrients are added to a tankof water to create a balanced nutrient reservoir, which is kept separatefrom the plants. This water is then pumped throughout a network oftubes and is released to the plants individually
NFT
The principle of the Nutrient Film Technique (NFT) system is to keepa constant flow of a thin layer of nutrient solution through the plant’sroots in a grow tray. This is a re-circulation method returning thesolution from the grow tray back to the nutrient reservoir below
DWC
Deep Water Culture(DWC) method, also known as floating or RAFT,plants are supported by baskets which fit into foam sheets directlyupon the reservoir of water with nutrients. The nutrient solution iscirculated and aerated with an air pump from below to maintain high level of oxygen and avoid stagnation.
Aeroponics
From all the hydroponic systems aeroponics is the most technologically advanced. Plants are supported in the top of the reservoir with theirroots suspended in the air. Roots are misted every few minutes with nutrient solution.
Aquaponics
Aquaponics relies on using fishes in symbioses with plants. This ar-rangement creates an ecosystem that benefits both plants and theaquatic life swimming below. The fish are essentially living in thenutrient reservoir
IoT System Design Before desiging Hydro-smart we set some goals and objectives Hydroponic monitoring
To control an hydroponic medium some intrinsic variables with greatsignificance concerning plant growth should be tracked
Water conductivity
The total concentration of the nutrient solution elements should bebetween 1000 and 1500ppm
Overviwe
Introduction
Problem Statment
Hydroponics Systems
Definition, Basic Systems....
Definition, Arch. and Basic protocols
Intrnet of Things
Hydro-Smart
System Overview and Architecture
Conclusion
Future Works
Font Awesome Kit.
IoT refers to a new kind of world where almost all the devices and appliances that we use are connected to a network.
Hydro-Smart
Design Objectives
User Frindly
Adaptive
Low Cost
Open source
Conclusion
Future Work
😎
Thank you!


Hi,
Hooray, {{ committer_name }} fixed {{ repo_name }}!
Commit:
Repo:
{{ repo_name }}
Commit:
{{ commit|truncate(6) }}
Committer:
{{ committer_name }}
Subject: {{ commit_subject }}
Build:
{{ build_num }}
Test results:
{{ build_num }}
Coverage results:
latest
Static analysis:
latest


About
This can be an about section.
here we introduce new types of dress designs and latest collections.
Oh, hello, nice to meet you!
design + presentations
This can be an about section.
here we introduce new types of dress designs and latest collections.
Put your portfolio or gallery images here for example. Able an hope of body. Any nay shyness article matters own removal nothing his forming. Gay own additions education satisfied the perpetual. If he cause manor happy. Without farther she exposed saw man led. Along on happy could cease green oh.
Able an hope of body. Any nay shyness article matters own removal nothing his forming. Gay own additions education satisfied the perpetual. If he cause manor happy. Without farther she exposed saw man led. Along on happy could cease green oh.
Betrayed cheerful declared end and. Questions we additions is extremely incommode.  Age lived smile six defer bed their few. Had admitting concluded too behaviour him she. Of death to or to being other.
Effects present letters inquiry no an removed or friends. Desire behind latter me though in. Supposing shameless am he engrossed up additions. My possible peculiar together to. Desire so better am cannot he up before points. Remember mistaken opinions it pleasure of debating. Court front maids forty if aware their at. Chicken use are pressed removed.
Saw yet kindness too replying whatever marianne. Old sentiments resolution admiration unaffected its mrs literature. Behaviour new set existence dashwoods. It satisfied to mr commanded consisted disposing engrossed. Tall snug do of till on easy. Form not calm new fail.
Effects present letters inquiry no an removed or friends. Desire behind latter me though in. Supposing shameless am he engrossed up additions. My possible peculiar together to. Desire so better am cannot he up before points. Remember mistaken opinions it pleasure of debating. Court front maids forty if aware their at. Chicken use are pressed removed.
Able an hope of body. Any nay shyness article matters own removal nothing his forming. Gay own additions education satisfied the perpetual. If he cause manor happy. Without farther she exposed saw man led. Along on happy could cease green oh.


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.apache.spark.graphx.EdgeContext<VD,ED,A>
public abstract class EdgeContext<VD,ED,A>
Represents an edge along with its neighboring vertices and allows sending messages along the
edge. Used in Graph.aggregateMessages(scala.Function1
.
| Constructor Summary | |
|---|---|
EdgeContext()
|
| Method Summary | ||
|---|---|---|
abstract ED |
attr()
The attribute associated with the edge. |
|
abstract VD |
dstAttr()
The vertex attribute of the edge's destination vertex. |
|
abstract long |
dstId()
The vertex id of the edge's destination vertex. |
|
abstract void |
sendToDst(A msg)
Sends a message to the destination vertex. |
|
abstract void |
sendToSrc(A msg)
Sends a message to the source vertex. |
|
abstract VD |
srcAttr()
The vertex attribute of the edge's source vertex. |
|
abstract long |
srcId()
The vertex id of the edge's source vertex. |
|
EdgeTriplet<VD,ED> |
toEdgeTriplet()
Converts the edge and vertex properties into an EdgeTriplet for convenience. |
|
static
|
unapply(EdgeContext<VD,ED,A> edge)
Extractor mainly used for Graph#aggregateMessages*. |
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EdgeContext()
| Method Detail |
|---|
public static <VD,ED,A> scala.Some<scala.Tuple5<Object,Object,VD,VD,ED>> unapply(EdgeContext<VD,ED,A> edge)
val messages = graph.aggregateMessages(
case ctx @ EdgeContext(_, _, _, _, attr) =>
ctx.sendToDst(attr)
, _ + _)
edge
- (undocumented)
public abstract long srcId()
public abstract long dstId()
public abstract VD srcAttr()
public abstract VD dstAttr()
public abstract ED attr()
public abstract void sendToSrc(A msg)
public abstract void sendToDst(A msg)
public EdgeTriplet<VD,ED> toEdgeTriplet()
EdgeTriplet
for convenience.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


| Pump |
|
|---|---|
| Style | (%) |
|
Speed (rpm)
|
|
| Drive | |
|
Kinematic Viscosity (cS)
|
|
| Specific Gravity | |
| Number Stages | |
| Fixed Specific Speed? | |
| Motor |
Line Frequency (Hz)
|
|
Rated Power
|
|
|
Speed (rpm)
|
|
| Efficiency Class | (%) |
|
Voltage(V)
|
|
|
Full-load Current(A)
|
|
|
Size Margin (%)
|
|
| Cost | |
|
Operating Fraction (%)
|
|
|
Energy Cost($/kwhr) |
|
| Field | |
|
Flow Rate |
|
|
Head
|
|
|
Motor Power (kW)
|
|
|
Motor Current(A)
|
|
|
Motor Voltage(V)
|
|
| Results |
ActualOptimal
|
|
Pump Efficiency (%)
|
|
|
Motor Rated Power
|
|
|
Motor Shaft Power
|
|
|
Pump Shaft Power
|
|
|
Motor Efficiency (%)
|
|
|
Motor Power Factor (%)
|
|
|
Motor Current (amps)
|
|
|
Motor Power (kW)
|
|
| Optimization Rating | |
| Summary | |
|
Annual Energy (MWh)
|
|
|
Annual Cost ($)
|
|
Savings Potential ($) |


This page is just a portal to the pages important to developers:
Sequencer Simulator
EAGLE Sequencer Simulator - Specifications
EAGLE Sequencer Simulator - Architecture
EAGLE Sequencer Simulator - Design
This page is just a portal to the pages important to developers:
EAGLE Sequencer Simulator - Specifications
EAGLE Sequencer Simulator - Architecture
EAGLE Sequencer Simulator - Design


{% extends "core/unified_index.html" %} {% block logincontent %}
Invalid username and password combination. Please try again.