With hierarchical clustering, outliers often show up as one-point clusters.
Generate three Gaussian distributions to illustrate the effect of outliers.
set.seed(656)
x = c(rnorm(150, 0, 1), rnorm(150,9,1), rnorm(150,4.5,1))
y = c(rnorm(150, 0, 1), rnorm(150,0,1), rnorm(150,5,1))
...
This package is created to handle server-side works of DataTables jQuery Plugin via AJAX option by using Eloquent ORM, Fluent Query Builder or Collection.
Read more about this here or here
Let
df = pd.DataFrame({'col_1':['A','B','A','B','C'], 'col_2':[3,4,3,5,6]})
df
# Output:
# col_1 col_2
# 0 A 3
# 1 B 4
# 2 A 3
# 3 B 5
# 4 C 6
To get the distinct values in col_1 you can use Series.unique()
df['col_1'].unique()
# Output:
...
Live upcase server that returns error when input string is longer than 10 characters.
Server:
const express = require('express'),
jsonParser = require('body-parser').json(),
app = express();
// Add headers to work with elm-reactor
app.use((req, res, next) => {
res.setHeader...
###### Used for both Classification and Regression examples
library(randomForest)
library(car) ## For the Soils data
data(Soils)
######################################################
## RF Classification Example
set.seed(656) ## for ...
If you have a dataframe with missing data (NaN, pd.NaT, None) you can filter out incomplete rows
df = pd.DataFrame([[0,1,2,3],
[None,5,None,pd.NaT],
[8,None,10,None],
[11,12,13,pd.NaT]],columns=list('ABCD'))
df
# Output:
# A B ...
JSX is not meant to be interpreted by the browser. It must be first transpiled into standard Javascript. To use JSX you need to install the plugin for babel babel-plugin-transform-vue-JSX
Run the Command below:
npm install babel-plugin-syntax-jsx babel-plugin-transform-vue-jsx babel-helper-vue-jsx...
HTTPS (Hypertext Transfer Protocol Secure) is an encrypted version of HTTP protocol, most often used in connection with services where only the sender and receiver must know the message. It's required if you handle credit card information, and will improve your rank on Google.
To enable HTTPS you n...
Probably the easies way to set up ruby on windows is to go to http://rubyinstaller.org/ and from there donwload an executable that you will install.
You don't have to set almost anything, but there will be one important window. It will have a check box saying Add ruby executable to your PATH. Confi...
Consider the ranges A1:A3 and B1:B3 having the same size and only number values, as below
=SUMPRODUCT(A1:A3,B1:B3)
This will loop through the ranges, taking the product of values in the same row and summing them, returning 32 in this example.
A1*B1 = 4
A2*B2 = 10
A3*B3 = 18
Consider the following ranges A1:A3 and B1:B3 as below
=SUMPRODUCT(--(A1:A3="c"),B1:B3)
This will first manipulate (A1:A3="c") into the following array
A1="c" = FALSE
A2="c" = FALSE
A3="c" = TRUE
Then apply the -- operator which converts...
Sometimes you need to make a script for someone but you are not sure what he has on his machine. Is there everything that your script needs? Not to worry. Bundler has a great function called in line.
It provides a gemfile method and before the script is run it downloads and requires all the necessa...
Unlike the .xs method, this allows you to assign values. Indexing using slicers is available since version 0.14.0.
In [1]:
import pandas as pd
import numpy as np
arrays = [['bar', 'bar', 'baz', 'baz', 'foo', 'foo', 'qux', 'qux'],
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two'...
Add the autodoc module in the extensions list present in the conf.py file at the root of your documentation:
extensions = [
'sphinx.ext.autodoc',
...
]
Autodoc needs to imports your modules to work.
You can include your code path in your conf.py file.
For instance:
import os
sys.path.insert(0, os.path.abspath('../src'))
Once a model is built predict is the main function to test with new data. Our example will use the mtcars built-in dataset to regress miles per gallon against displacement:
my_mdl <- lm(mpg ~ disp, data=mtcars)
my_mdl
Call:
lm(formula = mpg ~ disp, data = mtcars)
Coefficients:
(Intercep...
Create an account
Go to https://bitbucket.org/
Click on Get Started on the top right corner
Enter your email address, and click continue
Enter your full name, password and verification code. Then click Continue
An email will be sent to you to verify that you created your account
After that...
Go to the Bitbucket repository you want to add users to.
On the left, go to Settings (the last icon on the bottom left).
Select Users and group access.
Under Users, start typing the name or email address of the user whom you want to add.
Select the privilege you want to grant that user (Read, ...
A simple multiwindow example using signals and slots.
There is a MainWindow class that controls the Main Window view. A second window controlled by Website class.
The two classes are connected so that when you click a button on the Website window something happens in the MainWindow (a text label i...