R: Finding relationships between 2 variables to determine any patterns in data I am working on finding relationships/patterns between 2 variables (Type_A, Type_B).  
Loc_ID <- c("45", "46", "47", "48", "49", "50", "51")
Type_A <- c(22.96,23.36,23.70,23.55,23.52,23.42,23.61)
Type_B <- c(9.26,9.28,9.35,9.44,9.42,9.43,9.46)

df1 <- data.frame(Loc_ID,Type_A,Type_B)

df1: 
+--------+--------+--------+
| Loc_ID | Type_A | Type_B |
+--------+--------+--------+
|     45 | 22.96  | 9.26   |
|     46 | 23.36  | 9.28   |
|     47 | 23.70  | 9.35   |
|     48 | 23.55  | 9.44   |
|     49 | 23.52  | 9.42   |
|     50 | 23.42  | 9.43   |
|     51 | 23.61  | 9.46   |
+--------+--------+--------+

Loc_ID is the location ID. Type_A & Type_B are 2 different measurement types. 
Some Background: 
This data was gathered from an experiment studying different hard discs. There are some hard discs that failed and some that passed. I determine this metric based on just looking at some contour profile plots of the discs using the measurement types I mentioned above. This is not an efficient process and I want to apply some data mining or machine learning techniques to automate my tasks. I did some extensive feature selection and I am sure that these measurement types tell me something about the potential causes in the process. I want to know how data mining could help determine the failure at the early stage and eliminate it. 
Note: I have reported a fraction of the data for one of the failed disc here in the example.  
I have tried the following so far 


*

*Generated simple stats and plots for initial visualization 

*Calculate key features of the data by performing dimensionality reduction 

*Found correlations in the dataset to determine if any relationships.


I would like to know any other methods to efficiently carry out this relationship analysis of these 2 measurement types. For example: profile comparisons with respect to locations, predict both the measurement types for building better models. I am just not able to think of best practices in machine learning to handle this problem. Kindly let me know any other techniques and how I could tackle this? I would like to automate my analysis so that I could use it on all the bad and good discs. 
 A: Although you gave some data it is still hard to tell what would be the best method to use for your challenge. Still I give it a shot.
In general it is always a good idea to do the steps you did already: summary statistics, visualization, correlation, linear regression.
In case the functional form doesn't seem to be linear you could try to find some other functional form. A good package is the following:
rgp: R genetic programming framework

RGP is a simple modular Genetic Programming (GP) system build in pure
  R. In addition to general GP tasks, the system supports Symbolic
  Regression by GP through the familiar R model formula interface. GP
  individuals are represented as R expressions, an (optional) type
  system enables domain-specific function sets containing functions of
  diverse domain- and range types. A basic set of genetic operators for
  variation (mutation and crossover) and selection is provided.

The vignette can be found here
To give you a code example based on your data:
library(rgp)

Loc_ID <- c("45", "46", "47", "48", "49", "50", "51")
Type_A <- c(22.96,23.36,23.70,23.55,23.52,23.42,23.61)
Type_B <- c(9.26,9.28,9.35,9.44,9.42,9.43,9.46)

df1 <- data.frame(Loc_ID,Type_A,Type_B)

iter <- 1000
set.seed(123)
newFuncSet <- functionSet("+","*","-","/","sin","cos")

result1 <- symbolicRegression(Type_B ~ Type_A, data=df1, functionSet=newFuncSet, stopCondition=makeStepsStopCondition(iter))
#result1 <- symbolicRegression(Type_B ~ Type_A, data=df1, functionSet=newFuncSet, stopCondition=makeFitnessStopCondition(0.1))

plot(df1$Type_B, col=1, type="l"); points(predict(result1, newdata = df1), col=2, type="l")
    #The best and worst individual can be shown using these commands:
    bf <- result1$population[[which.min(sapply(result1$population, result1$fitnessFunction))]]
bf

The results are not very meaningful for this very small dataset but you should give it a try with the real dataset. You should fiddle a little with the function set and with the number of iterations (iter) to see if you get better fitting results.
I would be interested if you get any interesting results. This is only one possibility how to proceed but I hope it helps to get you started.
